Abstract Simple Summary Aglais urticae (Lepidoptera, Nymphalid) is a common butterfly distributed in temperate regions worldwide. The nettle Urtica cannabina (Urticaceae) is key to the survival of the small tortoiseshell, which provides its primary food source. This species is also a toxic plant listed in the Chinese Flora Atlas database, as it has poisonous roots and leaves. However, the phytophagous insect has evolved different adaptations against the plant′s defense system. This study aims to identify the genes linked to feeding strategies and adaptations of Aglais urticae’s larval feeding preference and detoxifying mechanism, and it may serve as an approach to help us understand the molecular process of its in vivo detoxification and find its related genes. Overall, these results provide the basis for future work on the detoxification and development of phytophagous insects by identifying the detoxification mechanism of A. urticae and their development-related genes in holometabolous insects. Abstract Herbivorous insects and host plants have developed a close and complex relationship over a long period of co-evolution. Some plants provide nutrients for insects, but plants’ secondary metabolites also influence their growth and development. Urtica cannabina roots and leaves are poisonous, yet Aglais urticae larvae feed on them, so we aimed to clarify the mechanism enabling this interaction. At present, studies on the detoxification mechanism of the A. urticae are rare. In our study, first, we used the A. urticae larval odor selection behavior bioassay and choice feeding preference assay to analyze the feeding preferences