Habituation (accepting food sources previously rejected) and cross‐habituation (accepting food sources containing deterrents after exposure to unrelated deterrents) induced by dietary experience are observed in lepidopteran larvae, but the physiological mechanisms underlying these phenomena are poorly understood. In this study, behavioural and electrophysiological responsiveness to three unrelated deterrents were investigated in larvae of Agrotis ipsilon (Hufnagel) (Lepidoptera: Noctuidae). Caterpillars were fed with one of four diets: ‘normal’ artificial diet or diet with low amounts of the alkaloid strychnine, the phenolic chlorogenic acid (CA), or the diterpene fumaropimaric acid (FA). These three chemicals are structurally different and are all deterrent to A. ipsilon caterpillars. In behavioural, dual‐choice assays with chemical‐treated leaf discs, caterpillars reared on normal diet fed less on treated discs, i.e., were highly deterred by the three chemicals. However, caterpillars fed on chemical‐infused diets did not distinguish between treated and non‐treated discs, i.e., they showed behavioural habituation. In triple‐choice leaf disc assays, larvae fed with CA were deterred by both CA and FA and vice versa, i.e., larvae fed diet with CA or FA showed cross‐habituation. There was no cross‐habituation between strychnine and CA/FA. Electrophysiological recordings revealed that the same deterrent neuron in the lateral sensilla styloconica responds to CA and FA. Desensitisation of this neuron, through exposure to CA or FA in diet, was correlated with the observed cross‐habituation. A different deterrent neuron, in the medial sensilla styloconica, responded to strychnine. Thus, no generalisation of either habituation or desensitisation occurred to deterrents that elicited responses from different deterrent neurons in the lateral and the medial sensilla styloconica. Cross‐habituation to deterrents correlated with desensitisation of the corresponding deterrent neuron.