Environmental conditions in early life can profoundly affect individual development and have consequences for reproductive success. Limited food availability may be one of the reasons for this, but direct evidence linking variation in early-life nutrition to reproductive performance in adulthood in natural populations is sparse. We combined historical agricultural data with detailed demographic church records to investigate the effect of food availability around the time of birth on the reproductive success of 927 men and women born in 18th-century Finland. Our study population exhibits natural mortality and fertility rates typical of many preindustrial societies, and individuals experienced differing access to resources due to social stratification. We found that among both men and women born into landless families (i.e., with low access to resources), marital prospects, probability of reproduction, and offspring viability were all positively related to local crop yield during the birth year. Such effects were generally absent among those born into landowning families. Among landless individuals born when yields of the two main crops, rye and barley, were both below median, only 50% of adult males and 55% of adult females gained any reproductive success in their lifetime, whereas 97% and 95% of those born when both yields were above the median did so. Our results suggest that maternal investment in offspring in prenatal or early postnatal life may have profound implications for the evolutionary fitness of human offspring, particularly among those for which resources are more limiting. Our study adds support to the idea that early nutrition can limit reproductive success in natural animal populations, and provides the most direct evidence to date that this process applies to humans.