Lycium barbarum is a plant of considerable economic importance in China. However, root rot poses a significant threat to its yield and quality, leading to substantial economic losses. The disparities in rhizosphere soil fungal communities between healthy and root-rot-affected L. barbarum have not been thoroughly explored. Delving into the dynamics between these fungal communities and the onset of root rot may provide pivotal insights for the biological control of this disease in L. barbarum, as well as aid in identifying fungi associated with the condition. In this study, we utilized rhizosphere soil samples from Ningqi No. 1, a distinguished cultivar of L. barbarum, as our experimental material. We assessed the composition and diversity of fungal communities in both diseased (D) and healthy (H) samples using Illumina MiSeq sequencing technology. The study’s findings revealed that the mean concentrations of total nitrogen (TN) and soil organic matter (SOM) were significantly higher in the healthy specimens when contrasted with the diseased ones, while the pH levels were notably increased in the latter group. Additionally, the alpha-diversity of fungal communities was observed to be greater within the healthy samples as opposed to the diseased samples. Marked distinctions in fungal diversity were discerned between the healthy (H) and diseased (D) samples. Ascomycota was identified as the predominant fungal phylum in both groups. In the healthy samples, beneficial fungi such as Plectosphaerella and Mortierella were prevalent, in contrast to the diseased samples, the relative abundances of Embellisia and Alternaria demonstrated remarkable increases of 89.59% and 87.41%, respectively. Non-metric Multidimensional Scaling (NMDS) illustrated clear distinctions in the composition of fungal communities between the healthy and diseased samples. Redundancy Analysis (RDA) indicated total nitrogen (TN), organic matter (SOM), total phosphorus (TP), Available Potassium (AK), pH, and Total Potassium (TK). Notably, pH showed a stronger correlation with the diseased samples, while TN and SOM were more significantly associated with the healthy samples.