Infants and children are at a high risk for seizures compared with adults. Although most seizures in children are benign and result in no long-term consequences, increasing experimental animal data strongly suggest that frequent or prolonged seizures in the developing brain result in long-lasting sequelae. Such seizures may intervene with developmental programmes and lead to inadequate construction of cortical networks rather than induction of neuronal cell loss. As a consequence, the deleterious actions of seizures are strongly age dependent: seizures have different effects on immature or migrating neurons endowed with few synapses and more developed neurons that express hundreds of functional synapses. This differential effect is even more important in human beings and subhuman primates who have an extended brain development period. Seizures also beget seizures during maturation and result in a replay of development programmes, which suggests that epileptogenesis recapitulates ontogenesis. Therefore, to understand seizures and their consequences in the developing brain, it is essential to determine how neuronal activity modulates the main steps of cortical formation. In this Review, we present basic developmental principles obtained from animal studies and examine the long-lasting consequences of epilepsy.