Comparison of microbial community diversity and composition of terrestrial and aquatic ecosystems in undisturbed regions could expand our understanding on the mechanisms of microbial community assembly and ecosystem responses to environmental change. This study investigated the spatial distribution of bacterial community diversity and composition in the lakeshore soils and lake sediments from one of the best preserved nature reserves, Hoh Xil on the Qinghai-Tibetan Plateau, and explored the corresponding environmental drivers. A total of 36 sediment and soil samples were collected from six alpine lakes and the corresponding shore zones, and their bacterial community structure was identified by high-throughput 16S rRNA gene sequencing. Significant difference (p < 0.05) in diversity and composition of bacterial communities between the soils and sediments was observed. Heterogeneous selection played a dominant role in shaping the spatial variations of bacterial communities between the soils and sediments. Results of canonical correspondence analysis showed that the difference in composition of bacterial communities at OTU level between the soils and sediments was mainly determined by the mean annual temperature, salinity, and contents of total organic carbon and total nitrogen. Structural equation modeling revealed that salinity played a significantly direct role in soil bacterial composition, while mean annual temperature indirectly affected the bacterial composition mainly through changing soil salinity. In contrast, the sediment bacterial composition was directly influenced primarily by the contents of total organic carbon and total nitrogen, while pH also had an important indirect effect on sediment bacterial composition. These results shed light on the distribution patterns of bacterial communities between lakeshore soils and lake sediments in high-altitude permafrost regions, and the major ecological processes and environmental drivers that shaped their bacterial communities, and provide insight into the mechanisms underlying microbial community assembly in such regions.