Plants produce secondary metabolites to provide chemical defense against herbivorous insects, whereas insects can induce the expression of detoxification metabolism-related unigenes in counter defense to plant xenobiotics. Tomatine is an important secondary metabolite in tomato (Lycopersicon esculentum L.) that can protect the plant from bacteria and insects. However, the mechanism underlying the adaptation of Spodoptera litura, a major tomato pest, to tomatine in tomato is largely unclear. In this study, we first found that the levels of tomatine in tomatoes subjected to S. litura treatment were significantly increased. Second, we confirmed the inhibitory effect of tomatine on S. litura by adding moderate amounts of commercial tomatine to an artificial diet. Then, we utilized RNA-Seq to compare the differentially expressed genes (DEGs) in the midgut and fat body tissues of S. litura exposed to an artificial diet supplemented with tomatine. In total, upon exposure to tomatine, 134 and 666 genes were upregulated in the S. litura midgut and fat body, respectively. These DEGs comprise a significant number of detoxification-related genes, including 7 P450 family genes, 8 glutathione S-transferases (GSTs) genes, 6 ABC transport enzyme genes, 9 UDP-glucosyltransferases genes and 3 carboxylesterases genes. Moreover, KEGG analysis demonstrated that the upregulated genes were enriched in xenobiotic metabolism by cytochrome P450s, ABC transporters and drug metabolism by other enzymes. Furthermore, as numerous GSTs were induced by tomatine in S. litura, we chose one gene, namely GSTS1, to confirm the detoxification function on tomatine. Expression profiling revealed that GSTS1 transcripts were mainly expressed in larvae, and the levels were the highest in the midgut. Finally, when larvae were injected with double-stranded RNA specific to GSTS1, the transcript levels in the midgut and fat body decreased, and the negative effect of the plant xenobiotic tomatine on larval growth was magnified. These results preliminarily clarified the molecular mechanism underlying the resistance of S. litura to tomatine, establishing a foundation for subsequent pest control.