A river–lake system plays an important role in water management by providing long-term and frequent water diversions. However, hydrological connectivity in the system can have a profound effect on sediment microbial communities through pH, nutrient concentrations, and benthos invertebrates. Consequently, identifying the key environmental factors and their driving mechanisms is vital for microbial adaptation strategies to extreme environments. In this study, we analyzed the significant difference in sediment bacterial and fungal community structures and diversity indices among Dongting Lake and its tributary rivers, which worked as a typical river-connected lake ecosystem. There were significant differences in biotic and abiotic environments in the sediment habitats of Dongting Lake and its tributary rivers. Random forest analysis revealed that pH and Mollusca were found to be the most important abiotic and biotic variables for predicting both bacterial and fungal community structures, respectively. The beta diversity decomposition analyses showed that the bacterial and fungal community compositional dissimilarities among different sections were dominated by species replacement processes, with more than half of the OTUs in each section being unique. Notably, both biotic and abiotic factors affected the number and the relative abundance of these bacterial and fungal unique OTUs, leading to changes in community composition. Mollusca, pH, TP, NO3-N, and NH4-N were negatively related to the relative abundance of Actinobacteria, Acidobacteria, Gemmatimonadetes, Planctomycetes, and Ascomycota, while Annelida and ORP were positively related to the relative abundance of Actinobacteria and Gemmatimonadetes. Additionally, PICRUSt analysis revealed that the functional dissimilarity among lakes and rivers was strengthened in unique species compared to all species in bacterial and fungal communities, and the changes of functional types helped to improve the habitat environment in the main Dongting Lake and promote the process of microbial growth. From our results, the role of macrozoobenthos and physicochemical characteristics in driving the sediment microbial community spatial variations became clear, which contributed to further understanding of the river–lake ecosystem.