Arbuscular mycorrhizal fungi (AMF) affect multiple ecosystem functions and processes, the assemblages of which vary across ecosystems. However, the influences of environmental factors on AMF communities which may shape these communities are still largely unknown. In this study, AMF communities from roots and rhizosphere soils of Chenopodium ambrosioides in different natural soils were investigated. The root habitat showed significantly smaller numbers of OTUs and lower community richness compared to the rhizosphere soil habitat. Most OTUs in the root habitat were shared by the soil habitat from the same sampling site, indicating that rhizosphere soils represent a pool of AMF species, a fraction of which is recruited by plants. Most of the AMF in root habitats were Glomeraceae, suggesting recruitment preferences of AMF by plants. The relative contributions of environmental factors to explain variations in AMF community composition and phylogenetic structure were assessed. The results revealed soil properties predominantly explained the variation, followed by geographic and climate parameters which explained a small fraction independently, while the host plant showed few explanations. Overall, our results indicated that soil and root habitats as well as soil characters, especially pH, nitrogen and micronutrients (Zn and Cu) affected AMF communities significantly.