Changes to the structure and function of neural networks are thought to underlie the evolutionary adaptation of animal behaviours. Among the many developmental phenomena that generate change programmed cell death (PCD) appears to play a key role. We show that cell death occurs continuously throughout insect neurogenesis and happens soon after neurons are born. Mimicking an evolutionary role for increasing cell numbers, we artificially block in the medial neuroblast lineage in Drosophila melanogaster, which results in the production of 'undead' neurons with complex arborisations and distinct neurotransmitter identities. Activation of these 'undead' neurons and recordings of neural activity in behaving animals demonstrate that they are functional. Focusing on two dipterans, which have lost flight during evolution, we reveal that reductions in populations of flight interneurons are likely caused by increased cell death during development. Our findings suggest that the evolutionary modulation of death-based patterning could generate novel network configurations.Just like a sculptor chips away at a block of granite to make a statue, the nervous system reaches its mature state by eliminating neurons during development through a process known as programmed cell death. In vertebrates, this mechanism often involves newly born neurons shrivelling away and dying if they fail to connect with others during development. Most studies in insects have focused on the death of neurons that occurs at metamorphosis, during the transition between larva to adult, when cells which are no longer needed in the new life stage are eliminated. Pop et al. harnessed a newly designed genetic probe to point out that, in fruit flies, programmed cell death of neurons at metamorphosis is not the main mechanism through which cells die. Rather, the majority of cell death takes place as soon as neurons are born throughout all larval stages, when most of the adult nervous system is built. To gain further insight into the role of this ‘early’ cell death, the neurons were stopped from dying, showing that these cells were able to reach maturity and function. Together, these results suggest that early cell death may be a mechanism fine-tuned by evolution to shape the many and varied nervous systems of insects. To explore this, Pop et al. looked for hints of early cell death in relatives of fruit flies that are unable to fly: the swift lousefly and the bee lousefly. This analysis showed that early cell death is likely to occur in these two insects, but it follows different patterns than in the fruit fly, potentially targeting the neurons that would have controlled flight in these flies’ ancestors. Brains are the product of evolution: learning how neurons change their connections and adapt could help us understand how the brain works in health and disease. This knowledge may also be relevant to work on artificial intelligence, a discipline that often bases the building blocks and connections in artificial ‘brains’ on how neurons communicate with one another.