This study presented a comprehensive analysis of the microbial ecology in water diversion rivers (WDRs) in the source area of the East Route of the South-to-North Water Diversion Project (ER-SNWDP) in China across various water periods. Proteobacteria, Chloroflexi, Acidobacteriota, and Bacteroidota were identified as the dominant microbial phyla in river sediment. During the wet period, microbial communities exhibited the highest richness, biodiversity, and the most intense antagonistic relationships compared to those in the dry and normal water periods. Generally, the microbial network predominantly existed in symbiotic models characterized by mutual benefit and symbiosis throughout all periods. During the dry period, the microbial co-occurrence network was found to be the most complex, with microbial OTUs showing the closest interconnections. The dominant mechanisms governing community diversity, succession, and biogeography were spatial turnover of species and stochastic processes. A more pronounced impact of stochastic processes on microbial community assemblages was observed during normal or wet periods than the dry period. Functional prediction of metabolic pathways indicated that the main ecological functions of microbial communities encompassed carbohydrate metabolism, amino acid metabolism, energy metabolism, etc. This study could provide essential scientific data for ecological regulation, ecological protection, and water resources management in WDRs.