A method for programming a memory is provided. The memory includes multiple rows of memory cells each including two half cells. The method includes the following steps. Whether the two half cells of a to-be-programmed memory cell of the nth row memory cells are both needed to be programmed or not is determined, wherein n is a positive integer. If the two half cells of the to-be-programmed memory cell are both needed to be programmed, a first initial programming bias voltage corresponding to the nth row memory cells is applied to program the to-be-programmed memory cell. Otherwise, a second initial programming bias voltage corresponding to the nth row memory cells is applied to program the to-be-programmed memory cell. The second initial programming bias voltage is higher than the first initial programming bias voltage.