Variation in sex differences is affected by both genetic and environmental variation, with rapid change in sex differences being more likely due to environmental change. One case of rapid change in sex differences is human lifespan, which has become increasingly female-biased in recent centuries. Long-term consequences of variation in the early-life environment may, in part, explain such variation in sex differences, but whether the early-life environment mediates sex differences in life-history traits is poorly understood in animals. Combining longitudinal data on 60 cohorts of pre-industrial Finns with environmental data, we show that the early-life environment is associated with sex differences in adult mortality and expected lifespan. Specifically, low infant survival rates and high rye yields (an important food source) in early-life are associated with female-bias in adult lifespan. These results support the hypothesis that environmental change has the potential to affect sex differences in life-history traits in natural populations of long-lived mammals.