The contamination of farmland soil with cadmium (Cd) poses a significant threat to the safety and quality of agricultural products. Herbivorous pests may develop adaptations to survive in Cd-contaminated farmland over time, potentially leading to population outbreaks. The gut microbiota plays a crucial role in this adaptation process, though the mechanisms involved remain unclear. This study examined the effects of two pepper cultivars of Capsicum annuum (Chiyan, CY, and Tianlanse, TLS) under Cd contamination on larval growth, development, food utilization, and gut microbiota of Spodoptera litura larvae. The inherent toxicity of TLS is higher than that of CY, as evidenced by a significant reduction in larvae survival rate in the control. In CY, Cd had a positive effect on larvae at low concentrations and a negative effect at high concentrations. Briefly, 5 mg/kg Cd of CY increased the efficiency of conversion of ingested food (ECI) and relative growth rate (RGR), whereas 10 mg/kg Cd decreased larvae growth and nutritional indices [higher relative consumption rate (RCR), approximate digestibility (AD), and lower efficiency of conversion of digested food (ECD)]. In TLS, Cd had a significant, dose-dependent, negative effect on larvae weight, ECD, and relative growth rate (RGR). Cd thus increased the negative effects of the plant toxins on the larvae. Meta-barcode sequencing of the 16S rRNA gene revealed that microbial diversity was affected by pepper cultivar but not Cd concentration. In larvae fed on CY, the most frequent bacterial genera were Enterococcus and Pluralibacte, whereas Enterococcus was the predominant genus in TLS larvae. Our findings reveal variations in how Cd impacts S. litura larvae across different pepper cultivars and imply that alterations in gut microbial communities could play a role in the joint detoxification of Cd and plant-derived toxins.