The enigmatic millipede Xystocheir bistipita has been rediscovered after a half-century. The rediscovery unexpectedly reveals that the species is bioluminescent. By reconstructing its evolutionary history, we show that X. bistipita is the evolutionary sister of Motyxia, the only bioluminescent millipede genus in the order Polydesmida. We demonstrate that bioluminescence originated in the group’s common ancestor and incrementally grew brighter through evolutionary time. Luminescence in Motyxia may have initially evolved to cope with metabolic stress triggered by a hot, dry environment and was repurposed as a warning signal by species colonizing high-elevation habitats with greater predation risk. The discovery of bioluminescence in X. bistipita and its pivotal evolutionary location provides insight into repeated evolution of bioluminescence across the tree of life.