ABSTRACT: Environmental properties are important factors in structuring soil microbial communities. The primary driving factors vary in different ecosystems. In the present work, we analyzed the microbial communities of rhizosphere and bulk soils associated with the halophyte Alhagi sparsifolia across three salt/water gradients in the desert area around Ebinur Lake Basin, China, using high-throughput sequencing technology. We found that there were significant differences in soil water content (SWC), soil salinity (SAL), total nitrogen (TN), and total phosphorus (TP) contents between the three water/salt gradients. In the L (low water and salt) plot, Actinobacteria was the most abundant bacterial phylum while Ascomycota was the dominant fungal phylum. The relative abundance of Actinobacteria was negatively correlated with soil pH, soil organic carbon (SOC), TP, and available phosphorus (AP). The abundance of Bacteroidetes was significantly positively correlated with soil SOC, SWC, SAL, pH, TN, and TP (P < 0.05). The abundance of fungal phylum Chytridiomycota was significantly positively correlated with pH (P < 0.01), SWC, AP, and sulfate ion (P < 0.05). SOC and nitrate nitrogen were the main factors impacting the bacterial community, while ammonium nitrogen (NH4+) and TP were the main driving forces for the fungal community. Soil nutrients were the main contributors to the dissimilarities in the bacterial and fungal communities, explaining 48.06% and 44.45% of the variation. SWC, SAL, and pH explained only a small percentage of the microbial community dissimilarity. In conclusion, soil microbial community structure was affected by SWC, SAL, pH, and soil nutrients, with soil nutrients as the main driving factors. Nitrogen has a differential effect on the different microbial communities: bacterial communities of Alhagi sparsifolia were mainly affected by nitrate nitrogen, while fungal communities were mainly driven by ammonium nitrogen.