Over recent millennia, human populations have regularly reconstructed their subsistence niches, changing both how they obtain food and the conditions in which they live. For example, over the last 12,000 years the vast majority of human populations shifted from foraging to practicing different forms of agriculture. The shift to farming is widely understood to have impacted several aspects of human demography and biology, including mortality risk, population growth, adult body size, and physical markers of health. However, these trends have not been integrated within an over-arching conceptual framework, and there is poor understanding of why populations tended to increase in population size during periods when markers of health deteriorated. Here, we offer a novel conceptual approach based on evolutionary life history theory. This theory assumes that energy availability is finite and must be allocated in competition between the functions of maintenance, growth, reproduction, and defence. In any given environment, and at any given stage during the life-course, natural selection favours energy allocation strategies that maximise fitness. We argue that the origins of agriculture involved profound transformations in human life history strategies, impacting both the availability of energy and the way that it was allocated between life history functions in the body. Although overall energy supply increased, the diet composition changed, while sedentary populations were challenged by new infectious burdens. We propose that this composite new ecological niche favoured increased energy allocation to defence (immune function) and reproduction, thus reducing the allocation to growth and maintenance. We review evidence in support of this hypothesis and highlight how further work could address both heterogeneity and specific aspects of the origins of agriculture in more detail. Our approach can be applied to many other transformations of the human subsistence niche, and can shed new light on the way that health, height, life expectancy, and fertility patterns are changing in association with globalization and nutrition transition.