In vertebrates, neurons often undergo apoptosis after differentiating and extending their axons. By contrast, in the developing nervous system of invertebrate embryos apoptosis typically occurs soon after cells are generated. Here, we show that the Drosophila dMP2 and MP1 pioneer neurons undergo segment-specific apoptosis at late embryonic stages, long after they have extended their axons and have performed their pioneering role in guiding follower axons. This segmental specificity is achieved by differential expression of the Hox gene Abdominal B, which in posterior segments prevents pioneer neuron death postmitotically and cell-autonomously by repressing the RHG-motif cell death activators reaper and grim. Our results identify the first clear case of a cell-autonomous and anti-apoptotic role for a Hox gene in vivo. In addition, they provide a novel mechanism linking Hox positional information to differences in neuronal architecture along the anteroposterior axis by the selective elimination of mature neurons.