Intercropping achieved through agroforestry is increasingly being recognized as a sustainable form of land use. In agroforestry, the roots of trees and crops are intermingled, and their interactions and the production of exudates alter the soil environment and soil microbial community. Although tree-crop interactions vary depending on the stand age of the trees, how stand age affects beneficial microorganisms, including arbuscular mycorrhizal fungi (AMF), and whether changes in soil microorganisms feed back on crop growth in agroforestry systems are unknown. We therefore conducted a long-term field study to compare changes in the soil microbial and AMF communities in a jujube/wheat agroforestry system containing trees of different stand ages: 3-year-old jujube, 8-year-old jujube, and 13-year-old jujube. Our results showed that by changing soil moisture and available phosphorus content, the stand age of the trees had a significant effect on the soil microbial and AMF communities. Soil moisture altered the composition of soil bacteria, in particular the proportions of Gram-positive and Gram-negative species, and available phosphorus had significant effects on the AMF community. A network analysis showed that older stands of trees reduced both AMF diversity and network complexity. An ordinary least squares regression analysis indicated that AMF diversity, network complexity, and stability contributed to wheat yield. Finally, structural equation modeling showed that changes in edaphic factors induced by tree age brought about significant variation in the soil microbial and AMF communities, in turn, affecting crop growth. Our study highlights the crucial roles of soil microorganisms, in particular AMF, in supporting plant growth in agroforestry systems as well as the need to consider stand age in the establishment of these systems.