As a crucial plateau freshwater lake in Yunnan Province, China, Erhai Lake exhibits distinct environmental heterogeneity driven by its unique watershed characteristics and human activities, significantly influencing sediment microbial communities. This study investigated the spatial relationships between environmental factors and microbial community structures in surface sediments from the eastern, western, and northern shores using redundancy analysis (RDA) and Spearman correlation analysis. Results revealed that pH, total nitrogen (TN), total phosphorus (TP), total organic carbon (TOC), and redox potential (Eh) were key drivers of microbial community divergence. The western shore, with the highest TP, TOC, and nitrogen levels, displayed elevated microbial diversity dominated by Proteobacteria and Bacteroidetes, reflecting higher pollution loads. The northern shore exhibited severe nitrogen pollution, marked by the highest TN content and enrichment of Thiobacillus, potentially enhancing water self-purification. The eastern shore, with minimal anthropogenic disturbance, showed the highest bacterial diversity but the lowest nutrient concentrations. Fungal community structure was significantly influenced by pH, Eh, and TOC, while ecological restoration measures on the western shore enhanced fungal community stability. This study highlights how spatial heterogeneity in environmental factors regulates microbial community structure and function, ultimately affecting the stability of lake ecosystems. These findings provide a scientific basis for ecological restoration and sustainable management of plateau lakes.