Differences in longevity between sexes is a mysterious yet general phenomenon across great evolutionary distances. To test the roles of responses to environmental cues and sexual behaviors in longevity regulation, we examined Caenorhabditis male lifespan under solitary, grouped, and mated conditions. We find that neurons and the germline are required for male pheromone-dependent male death. Hermaphrodites with a masculinized nervous system secrete male pheromone and are susceptible to male pheromone killing. Male pheromone-mediated killing is unique to androdioecious Caenorhabditis, and may reduce the number of males in hermaphroditic populations; neither males nor females of gonochoristic species are susceptible to male pheromone killing. By contrast, mating-induced death, which is characterized by germline-dependent shrinking, glycogen loss, and ectopic vitellogenin expression, utilizes distinct molecular pathways and is shared between the sexes and across species. The study of sex- and species-specific regulation of aging reveals deeply conserved mechanisms of longevity and population structure regulation.