Large stocks of carbon and nitrogen stored in permafrost regions can potentially feed back to global biogeochemical cycles under climate warming. To understand the response of microbial communities to environmental changes, this study investigated the spatial distribution of bacterial communities in the upper layers (0-10, 10-20, and 20-30cm) of seasonally frozen soil on the Tibetan Plateau and their relationships with the environmental factors. A total of 135 soil samples were collected from the soils at depths of 0-10, 10-20, and 20-30cm in the Lhasa River and Nyang River basins, and the diversity and composition of bacterial communities in them were identified by high-throughput 16S rRNA gene sequencing. Bacterial diversity changed significantly with soil depth in the Nyang River basin (p < 0.001), while no obvious change was found in the Lhasa River basin. The whole bacterial composition exhibited small variations across different soil layers (p > 0.05). The relative abundance of aerobic bacteria, Sphingomonas and Arthrobacter, decreased with soil depth, while that of the other aerobic, facultative anaerobic, and anaerobic bacteria did not exhibit this trend. Soil pH was the key driving edaphic factor of the whole bacterial composition in all three depth layers, while vegetation also had an important influence on bacterial composition. Arthrobacter, Bradyrhizobium, and Bacillus had obvious correlations with soil nutrients or vegetation, while the other species were not significantly correlated with any environmental factors. Structural equation modeling revealed that vegetation and mean annual temperature had a key direct impact on the bacterial diversity and composition, respectively. Climate also indirectly affected bacterial communities, mainly through shaping soil pH and vegetation. These results indicate that the soil depth has a different impact on the bacterial α-diversity, whole bacterial composition, and specific taxa in the 0-30-cm surface layers of seasonally frozen soil, which were mainly determined by various environmental factors.