Larvae of the leaf beetle subtribe Chrysomelina sensu stricto repel their enemies by displaying glandular secretions that contain defensive compounds. These repellents can be produced either de novo (iridoids) or by using plant-derived precursors (e.g. salicylaldehyde). The autonomous production of iridoids, as in Phaedon cochleariae, is the ancestral chrysomeline chemical defence and predates the evolution of salicylaldehyde-based defence. Both biosynthesis strategies include an oxidative step of an alcohol intermediate. In salicylaldehyde-producing species, this step is catalysed by salicyl alcohol oxidases (SAOs) of the glucose-methanol-choline (GMC) oxidoreductase superfamily, but the enzyme oxidizing the iridoid precursor is unknown. Here, we show by in vitro as well as in vivo experiments that P. cochleariae also uses an oxidase from the GMC superfamily for defensive purposes. However, our phylogenetic analysis of chrysomeline GMC oxidoreductases revealed that the oxidase of the iridoid pathway originated from a GMC clade different from that of the SAOs. Thus, the evolution of a host-independent chemical defence followed by a shift to a host-dependent chemical defence in chrysomeline beetles coincided with the utilization of genes from different GMC subfamilies. These findings illustrate the importance of the GMC multi-gene family for adaptive processes in plant-insect interactions.