Abstract Discretional cannibalism is a widespread phenomenon among lepidopteran herbivores. Herbivores encounter variation in dietary nutrient quality when foraging, which alters feeding behaviour, as well as population‐ and trophic‐level dynamics. For example, plant resistance traits directly influence feeding patterns in insect herbivores through reduced consumption of plant tissue and increased rates of cannibalism. However, the effects of dietary composition, in particular unbalanced macronutrient ratios, on driving cannibalism remain unknown. We examined the effects of unbalanced macronutrient ratios on cannibalism in the generalist caterpillar Trichoplusia ni using an artificial diet experiment with varied ratios of two important macronutrients: protein and carbohydrates. We quantified cannibalistic behaviour from the second instar to pupation and measured survival among cannibals and non‐cannibals to understand the long‐term and short‐term costs and benefits of cannibalism. Caterpillars in high carbohydrate, low protein treatments cannibalised 20% more than the optimum control diet treatment, whereas herbivores in high protein, low carbohydrate treatments cannibalised 33% more than herbivores reared on the optimum macronutrient diet treatment. Survival of cannibals in macronutrient‐deficient diet treatments was 10.4%, compared with 76.9% for cannibals in the optimal macronutrient diet treatment. While previous work demonstrates the importance of induced chemical defence in promoting shifts to cannibalism, our results indicate that unbalanced macronutrient ratios can also promote cannibalism in insect herbivores. We propose that understanding how unbalanced macronutrient ratios drive cannibalism yields insight into how dietary quality, including both plant resistance traits and plant nutrients, influences behavioural plasticity and mediates plant–herbivore interactions.