Globally increasing temperatures may strongly affect insect herbivore performance, as their growth and development is directly linked to ambient temperature as well as host-plant quality. In contrast to direct effects of temperature on herbivores, indirect effects mediated via thermal effects on host-plant quality are only poorly understood, despite having the potential to substantially impact performance and thereby to alter responses to the changing climatic conditions. We here use a full-factorial design to explore the direct (larvae were reared at 17 °C or 25 °C) and indirect effects (host plants were reared at 17 °C or 25 °C) of temperature on larval growth and life-history traits in the temperate-zone butterfly Pieris napi. Direct temperature effects reflected the common pattern of prolonged development and increased body mass at lower temperatures. At the higher temperature, efficiency of converting food into body matter was much reduced being accompanied by an increased food intake, suggesting compensatory feeding. Indirect temperature effects were apparent as reduced body mass, longer development time, an increased food intake, and a reduced efficiency of converting food into body matter in larvae feeding on plants grown at the higher temperature, thus indicating poor host-plant quality. The effects of host-plant quality were more pronounced at the higher temperature, at which compensatory feeding was much less efficient. Our results highlight that temperature-mediated changes in host-plant quality are a significant, but largely overlooked source of variation in herbivore performance. Such effects may exaggerate negative effects of global warming, which should be considered when trying to forecast species' responses to climate change.