Immense chemical diversity is one of the hallmark features of plants. This chemo-diversity is mainly underpinned by a highly complex and biodiverse biochemical machinery. Plant metabolic enzymes originated and were inherited from their eukaryotic and prokaryotic ancestors and further diversified by the unprecedentedly high rates of gene duplication and functionalization experienced in land plants. Unlike prokaryotic microbes, which display frequent horizontal gene transfer events and multiple inputs of energy and organic carbon, land plants predominantly rely on organic carbon generated from CO2 and have experienced relatively few gene transfers during their recent evolutionary history. As such, plant metabolic networks have evolved in a stepwise manner using existing networks as a starting point and under various evolutionary constraints. That said, until recently, the evolution of only a handful of metabolic traits had been extensively investigated and as such, the evolution of metabolism has received a fraction of the attention of, the evolution of development, for example. Advances in metabolomics and next-generation sequencing have, however, recently led to a deeper understanding of how a wide range of plant primary and specialized (secondary) metabolic pathways have evolved both as a consequence of natural selection and of domestication and crop improvement processes. This article is part of the theme issue 'The evolution of plant metabolism'.