IntroductionLong-term use of chemical fertilizers (CFs) can cause soil compaction and acidification. In recent years, bio-organic fertilizers (BOFs) have begun to replace CFs in some vegetables and cash crops, but the application of CFs or BOFs has resulted in crop quality and disease occurrence.MethodsThis study aimed to analyze the microbial mechanism of differences between CFs and BOFs in root disease, quality, and yield of tuber Chinese herbal medicine. We studied the effects of CFs, organic fertilizers, commercial BOFs, biocontrol bacteria BOFs, and biocontrol fungi BOFs on rhizosphere microbial community structure and function, root rot, quality, and yield of Codonopsis pilosula at different periods after application and analyzed the correlation.Results and discussionCompared to CFs, the emergence rate and yield in BOF treatments were increased by 21.12 and 33.65%, respectively, and the ash content, water content, and disease index in the BOF treatments were decreased by 17.87, 8.19, and 76.60%, respectively. The structural equation model showed that CFs promoted the quality and yield of C. pilosula by influencing soil environmental factors, while BOFs directly drove soil bacterial community to reduce disease index and improve the quality and yield of C. pilosula. There was a stronger interaction and stability of soil microbial networks after BOF treatments. Microlunatus, Rubrobacter, Luteitalea, Nakamurella, and Pedomicrobium were identified as effector bacteria, which were related to disease prevention and yield and quality increase of C. pilosula. Microbial functional analysis indicated that the signal transduction and amino acid metabolism of soil bacteria might play a major role in improving the quality and yield of C. pilosula in the early and middle growth stages. In conclusion, compared to CFs, BOFs obtained a lower disease index of root rot and a higher quality and yield of C. pilosula by changing the structure and function of the rhizosphere bacterial community.