Abstract Continuous cultivation can lead to soil nutrient imbalances and have adverse effects on soil rhizosphere microorganisms. This study investigated the impact of continuous cultivation of Salvia miltiorrhiza on rhizosphere soil microbial communities by comparing four planting durations: CK (no cultivation), D1 (annual planting), D2 (two consecutive years), and D3 (three consecutive years). High-throughput sequencing technology was used to analyze changes in rhizosphere soil microbial communities. The results revealed that the planted soil of Salvia miltiorrhiza exhibited lower abundances of beneficial bacteria such as Bacillus and Acidothermus compared to CK. The pathogenic fungus Fusarium was found to found to have the highest abundance in D2 soil. Linear discriminant analysis effect size analysis at the genus level identified several biomarkers, including g_Candidatus_Solibacter, g_Sphingomonas, g_RB41, and g_Chitinophaga as bacterial markers, while g_Talaromyces, g_Thermomyces, g_Trichothecium, g_Solicoccozyma, and g_Pseudopithomyces as fungal markers. Correlation analysis between these microbial markers and environmental factors showed that total nitrogen had a significant positive correlation with bacteria g_Candidatus_Solibacter and fungi g_Solicoccozyma, but a significant negative correlation with bacteria g_Sphingomonas and g_RB41. Soil organic matter showed a negative correlation with g_Sphingomonas; g_Candidatus Solibacter was negatively correlated with g_Sphingomonas.