The project GAIA has made substantial progress on the study of insect–plant interactions at macroevolutionary scale using genomic and diversification approaches within a phylogenetic context. Given the complexity of shifting to a new host plant, we expect more widespread effects across the entire genome, but this has remained difficult to demonstrate and previous studies focused on candidate genes (e.g. cytochrome P450). Indeed, both comprehensive species-level phylogeny and genomic data are necessary to disentangle the origin of the arms race and to understand the underlying mechanisms of insect–plant interaction as a major driver of diversification. The swallowtail model offers a relevant opportunity to better understand the role played by ecological interactions over the long timescales shaping the astonishing diversity of herbivores. We take this challenge by inferring the most comprehensive time-calibrated phylogeny of the family (two-thirds of the species richness), estimating ancestral host-plant preferences across this phylogeny, and assembling a genomic dataset comprising 45 genomes covering all swallowtail genera. To evaluate whether there are any genomic signatures of positive selection caused by host–plant shifts within swallowtails, we perform a comparative genomic survey of molecular adaptation between swallowtail lineages that shifted to new host plants compared to non-shifting lineages (shifts and non-shifts are determined thanks to the ancestral host-plant preferences). We estimate the ratio of non-synonymous substitutions (dN) other synonymous substitutions (dS) in all branches where a host–plant shift was identified relative to branches with no host–plant shift. The dN/dS analyses on branches with host–plant shifts (combined or not with environmental shifts) showed more genes evolving under positive selection (dN/dS > 1) in lineages shifting to a new plant family. We then performed dN/dS analyses for branches with host–plant shifts only (not followed by environmental shifts) and found that swallowtail lineages shifting to a new host–plant family had significantly more genes under positive selection than non-shifting lineages. This genome-wide analyses have also generated a list of candidate genes potentially involved in plant–insect interactions, which opens new research avenues for finding the functionality of genes potentially linked with the adaptation of phytophagous insects. We hope that this study will help move in that direction, and that it will provide perspectives for future investigations of other model groups. We have been able to investigate genome-wide adaptive processes and corresponding macroevolutionary consequences in a comprehensive framework, suggesting that more genes could be involved in host–plant shifts than previously studied in the diversification of herbivorous insects. This confirms that host–plant shifts are complex and would thus require several adaptations, which likely affect various genes beyond those directly linked to detoxification of the plant compounds. By expanding the possible genes and gene families and identifying more adaptations than those gene families in detoxification pathways that were detected through antagonist interactions, we show wide-ranging coevolutionary consequences for close relationships between insects and their host plants. This proof of concept, at the genus level, is promising and encourages us to reproduce a more thorough analysis at the species level with more fine-scale host-plant shifts (both ancient and recent shifts) and more and better genome data (all species and higher quality for the genomes). Indeed, the genus-level analysis came with statistical limits because we could only perform the comparative genomic analysis for 28 branches, which brings questions about the robustness of the dN/dS results. This study also provides a list of candidate genes that could be involved in host-plant adaptations in different lineages. Likewise, this study has limits because the nature of genes under selection remains unknown and not exhaustive in terms of tested branches. With more data, we thus expect new results that will reveal whether host-plant shifts do foster adaptations and diversification in phytophagous insects, and it will unveil genes under positive selection with more certainty by comparing sets of phylogenetic branches that experienced a host-plant shift versus branches without such a shift. Finally, studying the transcriptomes of caterpillars and their host plants will provide additional and important clues to better understand the arms race.