Throughout life, neuronal networks in the mammalian neocortex maintain a balance of excitation and inhibition, which is essential for neuronal computation1,2. Deviations from a balanced state have been linked to neurodevelopmental disorders, and severe disruptions result in epilepsy3–5. To maintain balance, neuronal microcircuits composed of excitatory and inhibitory neurons sense alterations in neural activity and adjust neuronal connectivity and function. Here we identify a signalling pathway in the adult mouse neocortex that is activated in response to increased neuronal network activity. Overactivation of excitatory neurons is signalled to the network through an increase in the levels of BMP2, a growth factor that is well known for its role as a morphogen in embryonic development. BMP2 acts on parvalbumin-expressing (PV) interneurons through the transcription factor SMAD1, which controls an array of glutamatergic synapse proteins and components of perineuronal nets. PV-interneuron-specific disruption of BMP2–SMAD1 signalling is accompanied by a loss of glutamatergic innervation in PV cells, underdeveloped perineuronal nets and decreased excitability. Ultimately, this impairment of the functional recruitment of PV interneurons disrupts the cortical excitation–inhibition balance, with mice exhibiting spontaneous epileptic seizures. Our findings suggest that developmental morphogen signalling is repurposed to stabilize cortical networks in the adult mammalian brain.