The evolution of herbivory (plant parasitism) in insects is a textbook example of a key innovation. Although comprising one-quarter of eukaryotic species, herbivores are present in one-third of insect orders because plants present major evolutionary ‘hurdles’ that when overcome, allow for invasion of a new adaptive zone. However, the origin of the herbivorous form is unknown because of its ancient and sudden evolution. Here I will trace the recent evolution of herbivory in the microbe-feeding Drosophila radiation and report an evolutionary and functional genomic analysis of the drosophilid Scaptomyza flava, a remarkable natural herbivore of the genetic model plant Arabidopsis thaliana, which is nested phylogenetically deep in the Drosophila lineage. Its close relationship with D. melanogaster and our use of mutant Arabidopsis as hosts allowed us to pinpoint phenotypic and genomic adaptations linked to the evolution of herbivory in S. flava. Implications for our understanding of the evolution of parasitism more generally will be discussed.