Organismal lifespan is highly plastic in response to environmental cues, and dietary restriction (DR) is the most robust way to extend lifespan in various species. Recent studies have shown that sex also is an important factor for lifespan regulation; however, it remains largely unclear how these two factors, food and sex, interact in lifespan regulation. The nematode Caenorhabditis elegans has two sexes, hermaphrodite and male, and only the hermaphrodites are essential for the short-term succession of the species. Here, we report an extreme sexual dimorphism in the responsiveness to DR in C. elegans; the essential hermaphrodites show marked longevity responses to various forms of DR, but the males show few longevity responses and sustain reproductive ability. Our analysis reveals that the sex determination pathway and the steroid hormone receptor DAF-12 regulate the sex-specific DR responsiveness, integrating sex and environmental cues to determine organismal lifespan.