Herbivorous insects are exceptionally diverse, accounting for a quarter of all known eukaryotic species, but the genomic basis of adaptations that enabled this dietary transition remains poorly understood. Many studies have suggested that expansions and contractions of chemosensory and detoxification gene families-genes directly mediating interactions with plant chemical defenses-underlie successful plant colonization. However, this hypothesis has been challenging to test because the origins of herbivory in many insect lineages are ancient (>150 million years ago (mya)), obscuring genomic evolutionary patterns. Here, we characterized chemosensory and detoxification gene family evolution across Scaptomyza, a genus nested within Drosophila that includes a recently derived (<15 mya) herbivore lineage of mustard (Brassicales) specialists and carnation (Caryophyllaceae) specialists, and several nonherbivorous species. Comparative genomic analyses revealed that herbivorous Scaptomyza has among the smallest chemosensory and detoxification gene repertoires across 12 drosophilid species surveyed. Rates of gene turnover averaged across the herbivore clade were significantly higher than background rates in over half of the surveyed gene families. However, gene turnover was more limited along the ancestral herbivore branch, with only gustatory receptors and odorant-binding proteins experiencing strong losses. The genes most significantly impacted by gene loss, duplication, or changes in selective constraint were those involved in detecting compounds associated with feeding on living plants (bitter or electrophilic phytotoxins) or their ancestral diet (fermenting plant volatiles). These results provide insight into the molecular and evolutionary mechanisms of plant-feeding adaptations and highlight gene candidates that have also been linked to other dietary transitions in Drosophila.