Patterns of variation in plant and animal diversity along precipitation gradients have been extensively studied, but much less is known about how and to what extent precipitation affects the biogeographic distribution of microbial diversity in arid areas across large spatial scales. Here we collected soils from 54 sites along a 3700 km transect covering a wide range of grassland ecosystems with distinct aridity gradients. We quantified the bacterial community diversity and the effects of climate, edaphic parameter and geographic distance on the bacterial community structure using high-throughput 16S rRNA gene sequencing. Of the 35 phyla detected, 6 were dominant: Actinobacteria, Acidobacteria, Alphaproteobacteria, Deltaproteobacteria, Bacteroidetes and Planctomycetes. Aridity was a major factor influencing bacterial diversity, community composition and taxon abundance. Although the pattern of bacterial species richness is markedly different from that of plant species richness, most soil bacteria were endemic to particular bioregions like macro-organisms. Community similarity significantly declined with environmental distance and geographic distance (r = −0.579 and −0.773, respectively). Geographic distance (historical contingencies) contributed more to bacterial community variation (36.02%) than combined environmental factors (24.06%). Overall, our results showed that geographic distance and climatic factors concurrently govern bacterial biogeographic patterns in arid and semi-arid grassland.