Codonopsis pilosula, a traditional Chinese medicinal and edible plant, contains several bioactive components. However, the biosynthetic mechanism is unclear because of the difficulties associated with functional gene analysis. Therefore, it is important to establish an efficient genetic transformation system for gene function analysis. In this study, we established a highly efficient Agrobacterium-mediated callus genetic transformation system for C. pilosula using stems as explants. After being pre-cultured for 3 days, the explants were infected with Agrobacterium tumefaciens strain GV3101 harboring pCAMBIA1381-35S::GUS at an OD600 value of 0.3 for 15 min, followed by co-cultivation on MS induction medium for 1 day and delayed cultivation on medium supplemented with 250 mg l-1 cefotaxime sodium for 12 days. The transformed calli were selected on screening medium supplemented with 250 mg l-1 cefotaxime sodium and 2.0 mg l-1 hygromycin and further confirmed by PCR amplification of the GUS gene and histochemical GUS assay. Based on the optimal protocol, the induction and transformation efficiency of calli reached a maximum of 91.07%. The establishment of a genetic transformation system for C. pilosula calli lays the foundation for the functional analysis of genes related to bioactive components through genetic engineering technology.