Global change drivers like warming and changing nutrient cycles have a substantial impact on ecosystem functioning. In most modelling studies, organism responses to warming are described through the temperature dependence of their biological rates. In nature, however, organisms are more than their biological rates. Plants are flexible in their elemental composition (stoichiometry) and respond to variance in nutrient availability and temperature. An increase in plant carbon-to-nutrient content means a decrease in food quality for herbivores. Herbivores can react to this decrease by compensatory feeding, which implies higher feeding rates and higher carbon excretion to optimize nutrient acquisition. In a novel model of a nutrient-plant-herbivore system, we explored the consequences of flexible stoichiometry and compensatory feeding for plant and herbivore biomass production and survival across gradients in temperature and nutrient availability. We found that flexible stoichiometry increases plant and herbivore biomasses, which results from increased food availability due to higher plant growth. Surprisingly, compensatory feeding decreased plant and herbivore biomasses as overfeeding by the herbivore reduced plants to low densities and depleted their resource. Across a temperature gradient, compensatory feeding caused herbivore extinction at a lower temperature, while flexible stoichiometry increased its extinction threshold. Our results suggest that compensatory feeding can become critical under warm conditions. In contrast, flexible stoichiometry is beneficial for plants up to a certain temperature threshold. These findings demonstrate the importance of accounting for adaptive and behavioural organismal responses to nutrient and temperature gradients when predicting the consequences of warming and eutrophication for population dynamics and survival.