Animal experiments have demonstrated that energy intake and the balance of macronutrients determine life span and patterns of age-specific mortality (ASM). Similar effects have also been detected in epidemiological studies in humans. Using global supply data and 1,879 life tables from 103 countries, we test for these effects at a macrolevel: between the nutrient supplies of nations and their patterns of ASM. We find that macronutrient supplies are strong predictors of ASM even after correction for time and economic factors. Globally, signatures of undernutrition are evident in the effects of low supply on life expectancy at birth and high mortality across ages, even as recently as 2016. However, in wealthy countries, the effects of overnutrition are prominent, where high supplies particularly from fats and carbohydrates are predicted to lead to high levels of mortality. Energy supplied at around 3,500 kcal/cap/d minimized mortality across ages. However, we show that the macronutrient composition of energy supply that minimizes mortality varies with age. In early life, 40 to 45% energy from each of fat and carbohydrate and 16% from protein minimizes mortality. In later life, replacing fat with carbohydrates to around 65% of total energy and reducing protein to 11% is associated with the lowest level of mortality. These results, particularly those regarding fats, accord both with experimental data from animals and within-country epidemiological studies on the association between macronutrient intake and risk of age-related chronic diseases.