In humans, mutations in the KCNQ2 or KCNQ3 potassium-channel genes are associated with an inherited epilepsy syndrome. We have studied the contribution of KCNQ/M-channels to the control of neuronal excitability by using transgenic mice that conditionally express dominant-negative KCNQ2 subunits in brain. We show that suppression of the neuronal M current in mice is associated with spontaneous seizures, behavioral hyperactivity and morphological changes in the hippocampus. Restriction of transgene expression to defined developmental periods revealed that M-channel activity is critical to the development of normal hippocampal morphology during the first postnatal weeks. Suppression of the M current after this critical period resulted in mice with signs of increased neuronal excitability and deficits in hippocampus-dependent spatial memory. M-current-deficient hippocampal CA1 pyramidal neurons showed increased excitability, reduced spike-frequency adaptation, attenuated medium afterhyperpolarization and reduced intrinsic subthreshold theta resonance. M channels are thus critical determinants of cellular and neuronal network excitability, postnatal brain development and cognitive performance.