Complex neuronal circuitries such as those found in the mammalian cerebral cortex have evolved as balanced networks of excitatory and inhibitory neurons. Although the establishment of appropriate numbers of these cells is essential for brain function and behaviour, our understanding of this fundamental process is limited. Here we show that the survival of interneurons in mice depends on the activity of pyramidal cells in a critical window of postnatal development, during which excitatory synaptic input to individual interneurons predicts their survival or death. Pyramidal cells regulate interneuron survival through the negative modulation of PTEN signalling, which effectively drives interneuron cell death during this period. Our findings indicate that activity-dependent mechanisms dynamically adjust the number of inhibitory cells in nascent local cortical circuits, ultimately establishing the appropriate proportions of excitatory and inhibitory neurons in the cerebral cortex.