Water sources from the lower reaches of the Heihe River northwest China, located in an arid area impacted by environmental stresses, have promoted changes to the local soil and plant conditions; however, our understanding of variations and drivers of soil bacterial communities in an arid inland river basin remains unclear. Therefore, we collected 39 soil samples from a riparian oasis zone (ROZ) to the circumjacent desert zone (CDZ) at the lower reaches of Heihe River to evaluate bacterial communities based on the 16S rRNA gene data. We found that the bacterial community composition differed between ROZ and CDZ habitats, with significantly higher relative abundance of the phyla Gemmatimonadetes and Acidobacteria in ROZ, whereas the abundance of the phyla Actinobacteria and Deinococcus–Thermus was greater in CDZ. The difference in the bacterial community was almost entirely generated by the species turnover rather than the nestedness among all samples. In addition, we found that bacterial α-diversity index showed no significant difference between ROZ and CDZ habitats. The distance-decay analysis showed that spatial distance, plant community, soil property, and plant functional trait were correlated with bacterial community variations. However, the variation partition analysis (VPA) revealed that both soil properties and plant community strongly explained the difference [such as soil water content (WC), soil silt content, and plant community structure] compared with plant functional traits in bacterial β-diversity and species turnover. Based on a co-occurrence network analysis, we found that the bacterial network of ROZ, which had more negative correlations, higher average connectivity, shorter average path length, and smaller modularity, was more complex than the network of CDZ. This suggested that the bacterial community was more stable and less vulnerable to change in the ROZ habitat than in the CDZ habitat. Overall, our findings suggest that the heterogeneity of soil properties and plant community collectively affect the structure of the soil bacterial community in an arid inland river basin. However, the influence of plant functional traits on the variation of the bacterial community depends on soil properties and plant community.