Life-history traits such as fecundity and offspring size are shaped by investment trade-offs faced by mothers and mediated by environmental conditions. We use a 21-year time series for three populations of wild sockeye salmon (Oncorhynchus nerka) to test predictions for such trade-offs and responses to conditions faced by females during migration, and offspring during incubation. In years when their 1100 km upstream migration was challenged by high water discharges, females that reached spawning streams had invested less in gonads by producing smaller but not fewer eggs. These smaller eggs produced lighter juveniles, and this effect was further amplified in years when the incubation water was warm. This latter result suggests that there should be selection for larger eggs to compensate in populations that consistently experience warm incubation temperatures. A comparison among 16 populations, with matching migration and rearing environments but different incubation environments (i.e., separate spawning streams), confirmed this prediction; smaller females produced larger eggs for their size in warmer creeks. Taken together, these results reveal how maternal phenotype and environmental conditions can shape patterns of reproductive investment and consequently juvenile fitness-related traits within and among populations.