A drive circuit 22 controls voltages applied to a substrate 1, selection gates SG0 and SG1, a local bit line LB2, and a control gate CGn. By respectively applying a negative voltage to the control gate CGn, a positive voltage to the selection gate SG0, a voltage lower than the voltage applied to the selection gate SG0 to the selection gate SG1, and a positive voltage to the local bit line LB2, the drive circuit 22 controls so that electrons are selectively drawn out of a floating gate FG3 to the local bit line LB2 by F-N tunneling during writing operation. Sufficient operation margin is obtained even when memory cells are miniaturized.