Abstract:[Background] The mechanism of community assembly is a hot topic in microbial ecology, and it remains uncertain whether the conclusions are completely applicable on a local scale. [Objective] To verify the community assembly mechanism on a small local scale and evaluate the applicability of relevant theories. [Methods] We compared the composition and assembly mechanisms of soil fungal communities in the forest, shrub, and grassland ecosystems in Lüliang, Shanxi. [Results] The results of high-throughput sequencing and statistical analysis indicated that the soil fungal communities presented different biogeographic distribution patterns in different ecosystems. The Sobs, ACE, and Chao1 indices of soil fungi in the forest ecosystem were 699.50, 835.22, and 838.36, respectively, which were higher than those of the other two ecosystems (P<0.05). The network analysis and Zi-Pi values showed that the network modules had regional differences, and the number and composition of keystone species were different among different ecosystems. According to the regression results, neutral community model analysis results, |βNTI|<2, RCbray values, the community migration rates are 0.003, 0.001 and 0.001, and a significant distance-delay distribution pattern (R=-0.059, P=0.018), we hypothesized that stochastic processes dominated the assembly of fungal communities in this study area. [Conclusion] The keystone species (Geopora, Trichoderma, etc.) are involved in the symbiotic network formation and community assembly and demonstrate broader functions and stronger adaptability to different ecosystems than the dominant species (Metarhizium, Gibberella, etc.). On this local scale, both deterministic and stochastic processes drive community assembly, with the former being dominant. This study aims to provide a scientific basis for the protection of different ecosystems in Lüliang of the Yellow River basin and enrich the clues for the universal application of theories in macroecology.