Lobetyolin is a key bioactive compound in Codonopsis pilosula, but the existing literature has not well explored the regulatory mechanisms governing its biosynthesis. This study performed a genome-wide identification of 175 AP2/ERF transcription factors (TFs), categorizing them into the AP2, ERF, and RAV subfamilies. Promoter analysis revealed numerous hormone- and stress-responsive cis-elements, with a notable prevalence of methyl jasmonate (MeJA)-related motifs. In MeJA-treated hairy root cultures, we observed a significant increase in lobetyolin accumulation. Integrated transcriptomic and metabolomic analyses demonstrated the activation of jasmonate signaling and secondary metabolism pathways. Two MeJA-induced TFs, CpERF140 and CpERF138, were identified as key regulatory candidates. Subsequent experiments confirmed their nuclear localization and specific binding affinity for GCC-box motifs. This study constitutes the inaugural genome-wide characterization of the AP2/ERF family in C. pilosula, employing hairy root culture as an effective platform for functional investigation. Our findings offer novel perspectives on the transcriptional regulation of lobetyolin biosynthesis, providing a foundation for the future metabolic engineering of this medicinal plant.