Learning and memory depend on the activity-dependent structural plasticity of synapses and changes in neuronal gene expression. We show that deletion of the MEF2C transcription factor in the CNS of mice impairs hippocampal-dependent learning and memory. Unexpectedly, these behavioral changes were accompanied by a marked increase in the number of excitatory synapses and potentiation of basal and evoked synaptic transmission. Conversely, neuronal expression of a superactivating form of MEF2C results in a reduction of excitatory postsynaptic sites without affecting learning and memory performance. We conclude that MEF2C limits excessive synapse formation during activity-dependent refinement of synaptic connectivity and thus facilitates hippocampal-dependent learning and memory.