Many animal species exhibit sex differences in aging. In the nematode Caenorhabditis elegans, under conditions that minimize mortality, males are the longer-lived sex. In a survey of 12 independent C. elegans isolates, we find that this is a species-typical character. To test the hypothesis that the C. elegans male longevity bias evolved as a consequence of androdioecy (having males and hermaphrodites), we compared sex-specific survival in four androdioecious and four dioecious (males and females) nematode species. Contrary to expectation, in all but C. briggsae (androdioecious), males were the longer-lived sex, and this difference was greatest among dioecious species. Moreover, male lifespan was reduced in androdioecious species relative to dioecious species. The evolutionary theory of aging predicts the evolution of a shorter lifespan in the sex with the greater rate of extrinsic mortality. We demonstrate that in each of eight species early adult mortality is elevated in females/hermaphrodites in the absence of food as the consequence of internal hatching of larvae (matricide). This age-independent mortality risk can favour the evolution of rapid aging in females and hermaphrodites relative to males.