Background Continuous monocropping can affect the physicochemical and biological characteristics of cultivated soil.Sophora flavescensis a valuable herbal medicine and sensitive to continuous monocropping. Currently, diversity patterns of soil microbial communities in soil continuous monocropping withS. flavescenshave not been extensively elucidated. Results In this study, comparative 16S rDNA and internal transcribed spacer (ITS) MiSeq sequencing analyses were used to examine the taxonomic community structure and microbial diversity in nonrhizosphere soil (CK) and rhizosphere soils (SCC, TCC, and FCC) sampled from fields that had undergone two, three, and five years of continuous monocropping, respectively. Among the microbial communities, a decreased abundance of Acidobacteria and increased abundances of Proteobacteria and Bacteroidetes were found with the increase in monocropping years ofS. flavescens. As the continuous monocropping time increased, the diversity of the bacterial community decreased, but that of fungi increased. Redundancy analysis also showed that among the properties of the rhizosphere soil, the available phosphorus, organic matter, total nitrogen, and sucrase had the greatest impacts on the diversity of the rhizosphere microbial community. Moreover, a biomarker forS. flavescenssoil was also identified using the most differentially abundant bacteria and fungi in soil samples. Conclusions Our study indicates that long-term monocropping exerted great impacts on microbial community distributions and soil physicochemical properties. The relationship between microbial community and physicochemical properties of rhizosphere soil would help clarify the side effects of continuousS. flavescensmonocropping. Our study may aid in uncovering the theoretical basis underlying obstacles to continuous monocropping and provide better guidance for crop production.