Dietary restriction extends healthy lifespan in diverse organisms and reduces fecundity. It is widely assumed to induce adaptive reallocation of nutrients from reproduction to somatic maintenance, aiding survival of food shortages in nature. If this were the case, long life under dietary restriction and high fecundity under full feeding would be mutually exclusive, through competition for the same limiting nutrients. Here we report a test of this idea in which we identified the nutrients producing the responses of lifespan and fecundity to dietary restriction in Drosophila. Adding essential amino acids to the dietary restriction condition increased fecundity and decreased lifespan, similar to the effects of full feeding, with other nutrients having little or no effect. However, methionine alone was necessary and sufficient to increase fecundity as much as did full feeding, but without reducing lifespan. Reallocation of nutrients therefore does not explain the responses to dietary restriction. Lifespan was decreased by the addition of amino acids, with an interaction between methionine and other essential amino acids having a key role. Hence, an imbalance in dietary amino acids away from the ratio optimal for reproduction shortens lifespan during full feeding and limits fecundity during dietary restriction. Reduced activity of the insulin/insulin-like growth factor signalling pathway extends lifespan in diverse organisms, and we find that it also protects against the shortening of lifespan with full feeding. In other organisms, including mammals, it may be possible to obtain the benefits to lifespan of dietary restriction without incurring a reduction in fecundity, through a suitable balance of nutrients in the diet.