Biologists still strive to identify the ecological and evolutionary drivers of phytochemical variation that mediates biotic interactions. We hypothesized that plant species growing at sites characterized by high herbivore pressure would converge to produce highly toxic blends of secondary metabolites, independently of phylogenetic constraints. To address the role of shared evolutionary history and ecological niches in driving variation in plant phytochemistry, we combined targeted metabolomics, with insect herbivore bioassays on Cardamine species growing along the entire elevational gradient of the Alps. We observed that plant species cluster according to similar habitat-mediated plant-growth forms and chemical profiles, independently of phylogenetic relationship. We also showed that novel indices summarizing functional phytochemical diversity better explain plant resistance against chewing and sap-feeding herbivores than classic diversity indices. We conclude that the functional axis of phytochemical diversity should be integrated with the functional axis of plant growth forms to address convergence along large-scale ecological gradients.