Fertilizers are widely used to produce more food, inevitably altering the diversity and composition of soil organisms. The role of soil biodiversity in controlling multiple ecosystem services remains unclear, especially after decades of fertilization. Here, we assess the contribution of the soil functionalities of carbon (C), nitrogen (N), and phosphorus (P) cycling to crop production and explore how soil organisms control these functionalities in a 33-year field fertilization experiment. The long-term application of green manure or cow manure produced wheat yields equivalent to those obtained with chemical N, with the former providing higher soil functions and allowing the functionality of N cycling (especially soil N mineralization and biological N fixation) to control wheat production. The keystone phylotypes within the global network rather than the overall microbial community dominated the soil multifunctionality and functionality of C, N, and P cycling across the soil profile (0-100 cm). We further confirmed that these keystone phylotypes consisted of many metabolic pathways of nutrient cycling and essential microbes involved in organic C mineralization, N2O release, and biological N fixation. The chemical N, green manure, and cow manure resulted in the highest abundances of amoB, nifH, and GH48 genes and Nitrosomonadaceae, Azospirillaceae, and Sphingomonadaceae within the keystone phylotypes, and these microbes were significantly and positively correlated with N2O release, N fixation, and organic C mineralization, respectively. Moreover, our results demonstrated that organic fertilization increased the effects of the network size and keystone phylotypes on the subsoil functions by facilitating the migration of soil microorganisms across the soil profiles and green manure with the highest migration rates. This study highlights the importance of the functionality of N cycling in controlling crop production and keystone phylotypes in regulating soil functions, and provides selectable fertilization strategies for maintaining crop production and soil functions across soil profiles in agricultural ecosystems.