Forests strongly affect climate through the exchange of large amounts of atmospheric CO2 (ref. 1). The main drivers of spatial variability in net ecosystem production (NEP) on a global scale are, however, poorly known. As increasing nutrient availability increases the production of biomass per unit of photosynthesis2 and reduces heterotrophic3 respiration in forests, we expected nutrients to determine carbon sequestration in forests. Our synthesis study of 92 forests in different climate zones revealed that nutrient availability indeed plays a crucial role in determining NEP and ecosystem carbon-use efficiency (CUEe; that is, the ratio of NEP to gross primary production (GPP)). Forests with high GPP exhibited high NEP only in nutrient-rich forests (CUEe = 33 ± 4%; mean ± s.e.m.). In nutrient-poor forests, a much larger proportion of GPP was released through ecosystem respiration, resulting in lower CUEe (6 ± 4%). Our finding that nutrient availability exerts a stronger control on NEP than on carbon input (GPP) conflicts with assumptions of nearly all global coupled carbon cycle–climate models, which assume that carbon inputs through photosynthesis drive biomass production and carbon sequestration. An improved global understanding of nutrient availability would therefore greatly improve carbon cycle modelling and should become a critical focus for future research.