Cavefishes have long been used as model organisms showcasing adaptive diversification, but does adaptation to caves also facilitate the evolution of reproductive isolation from surface ancestors? We raised offspring of wild-caught surface- and cave-dwelling ecotypes of the neotropical fish Poecilia mexicana to sexual maturity in a 12-month common garden experiment. Fish were raised under one of two food regimes (high vs. low), and this was crossed with differences in lighting conditions (permanent darkness vs. 12:12 h light:dark cycle) in a 2 × 2 factorial design, allowing us to elucidate potential patterns of local adaptation in life histories. Our results reveal a pattern of sex-specific local life-history adaptation: Surface molly females had the highest fitness in the treatment best resembling their habitat of origin (high food and a light:dark cycle), and suffered from almost complete reproductive failure in darkness, while cave molly females were not similarly affected in any treatment. Males of both ecotypes, on the other hand, showed only weak evidence for local adaptation. Nonetheless, local life-history adaptation in females likely contributes to ecological diversification in this system and other cave animals, further supporting the role of local adaptation due to strong divergent selection as a major force in ecological speciation.