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. 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 of A. urticae on its host plant, U. cannabina. Next, we used transcriptome sequencing to obtain the unigenes annotated and classified by various databases, such as KEGG and GO. In this study, we found that U. cannabina could attract A. urticae larvae to feed via scent, and the feeding preference assay confirmed that larvae preferred U. cannabina leaves over three other plants: Cirsium japonicum, Cannabis sativa, and Arctium lappa. The activity of detoxifying enzymes GST and CarE changed in larvae that had consumed U. cannabina. Furthermore, through transcriptomic sequencing analysis, 77,624 unigenes were assembled from raw reads. The numbers of differentially expressed genes were calculated using pairwise comparisons of all life stages; the expression of detoxification enzyme genes was substantially higher in larvae than in the pupal and adult stages. Finally, we identified and summarized 34 genes associated with detoxification enzymes, such as UDP-glucose 4-epimerase gene, 5 Glutathione S-transferase genes, 4 Carboxylesterase genes, 4 Cytochrome P450 genes, 10 ATP-binding cassette genes, 4 Superoxide dismutase, and Peroxidase. Moreover, we identified 28 genes associated with the development of A. urticae. The qRT-PCR results were nearly consistent with the transcriptomic data, showing an increased expression level of four genes in larvae. Taken together, this study examines the correlation between A. urticae and host plants U. cannabina, uncovering a pronounced preference for A. urticae larvae toward host plants. Consistent with RNA-seq, we investigated the mechanism of A. urticae's interaction with host plants and identified detoxification-related genes. The present study provides theoretical support for studying insect adaptation mechanisms and biological control. [ABSTRACT FROM AUTHOR]