Water quality and aquatic ecosystems along lakeshores are vital for ecological balance and human well-being. However, research has primarily focused on plankton, with benthic niches being largely overlooked. To enhance understanding of benthic microbial communities, we utilized 16S and 18S rRNA sequencing alongside multivariate statistical methods to analyze samples from the shoreline of Lake Taihu in Huzhou City, Zhejiang Province. Our results reveal a marked difference in species composition between benthic and planktonic microorganisms, with benthic cyanobacteria predominantly comprising filamentous genera like Tychonema, while 95% of planktonic cyanobacteria were Cyanobium. The β-diversity of benthic microorganisms was notably higher than that of planktonic counterparts. The neutral community model indicated that stochastic processes dominated planktonic microbial assembly, while deterministic processes prevailed in benthic communities. Null models showed that homogeneous selection influenced benthic community assembly, whereas planktonic communities were affected by undominated processes and dispersal limitation. Network analysis indicated that planktonic networks were more stable than benthic networks. Importantly, dominant benthic cyanobacterial genera posed potential toxin risks, highlighting the need for enhanced monitoring and ecological risk assessment. Overall, these findings enhance our understanding of benthic and planktonic microbial communities in lakeshores and offer valuable insights for aquatic assessment and management in eutrophicated environments.