The mechanism of bacterial community assembly has been the hot spot in the field of microbial ecology and it is difficult to quantitatively estimate the influences of different ecological processes. Here, a total of 23 pairs of planktonic and sedimentary samples were collected from five lakes in Wuhan, China. significant higher α-diversity (p < 0.001) and β-diversity (p < 0.001) of bacterial communities were observed in sediment than those in water. Some phylum had linear relationships with the comprehensive TSI (TSIc) by regression analysis. Non-metric multidimensional scaling (NMDS) and redundancy analysis (RDA) revealed that the depth of water, NO3−-N, NH4+-N, PO43−, and CODcr were the key environmental variables in planktonic bacterial communities, whereas in sediment they were the depth, NO3−-N, and NH4+-N. Furthermore, variation partitioning analysis (VPA) showed that spatial and environmental factors could only explain 40.2% and 27.9% of the variation in planktonic and sedimentary bacterial communities, respectively. More importantly, null model analysis suggested that different assembly mechanisms were found between in water and in sediment with the fact that planktonic bacterial community assembly was mainly driven by dispersal limitation process whereas variable selection process played a vital role in that of sediment.