Temperature and nutrition are amongst the most common environmental challenges faced by organisms and will become increasingly so with ongoing climate change. While we have learnt a great deal about how temperature and nutrition affect life-history traits on their own, we know very little about their combined effect on animal performance. Given that animals in the wild are likely to experience changes in both their thermal and nutritional conditions, we need to understand how interactions between these conditions shape an animal's response if we hope to mitigate the effects of environmental change. In the present research, we investigated the combined effects of nutrition and temperature on key life-history traits in Drosophila melanogaster. Using nutritional geometry, developing larvae were exposed to a range of diets varying in their protein and carbohydrate content and to one of two developmental temperature regimes (25 degrees C and 28 degrees C). We then examined key life-history traits: development time, viability, and two estimates of body size-wing and femur size. We found that developmental temperature significantly changed the response to nutrition for all traits. Increased temperature led to more restricted trait optima for all traits and exacerbated the negative effects of carbohydrate-rich diets, resulting in harsher trade-offs between life-history traits. For example, at 25 degrees C there were more diets that led to high viability, fast development and large body size than at 28 degrees C. However, for the diets that produced the best outcomes for each trait, temperature had less of an effect. These findings highlight the importance of studying the effects of combined stressors when assessing animals' responses to changing environmental conditions. A plain language summary is available for this article.