Unraveling the influence of community assembly processes on soil ecosystem functioning presents a major challenge in the field of theoretical ecology, as it has received limited attention. Here, we used a series of long‐term experiments spanning over 25 years to explore the assembly processes of bacterial, fungal, protist, and nematode communities using high‐throughput sequencing. We characterized the soil microbial functional potential by the abundance of microbial genes associated with carbon, nitrogen, phosphorus, and sulfur cycling using GeoChip‐based functional gene profiling, and determined how the assembly processes of organism groups regulate soil microbial functional potential through community diversity and network stability. Our results indicated that balanced fertilization (NPK) treatment improved the stochastic assembly of bacterial, fungal, and protist communities compared to phosphorus‐deficient fertilization (NK) treatment. However, there was a nonsignificant increase in the normalized stochasticity ratio of the nematode community in response to fertilization across sites. Our findings emphasized that soil environmental factors influenced the assembly processes of the biotic community, which regulated soil microbial functional potential through dual mechanisms. One mechanism indicated that the high phosphorus levels and low soil nutrient stoichiometry may increase the stochasticity of bacterial, fungal, and protist communities and the determinism of the nematode community under NPK treatment, ultimately enhancing soil microbial functional potential by reinforcing the network stability of the biotic community. The other mechanism indicated that the low phosphorus levels and high soil nutrient stoichiometry may increase the stochastic process of the bacterial community and the determinism of the fungal, protist, and nematode communities under NK treatment, thereby enhancing soil microbial functional potential by improving the β‐diversity of the biotic community. Taken together, these results provide valuable insights into the mechanisms underlying the assembly processes of the biotic community that regulate ecosystem functioning.