Cyanobacterial bloom caused by eutrophication in lakes has become one of the significant environmental problems worldwide. However, a notable research gap persists in understanding the environmental adaptation and community assembly of microbial dynamics in response to different blooming stages. Therefore, metagenomic sequencing was employed in this study to investigate alterations in the microbial community composition in water and sediment during different stages of cyanobacterial blooms in Lake Taihu. The results indicated significant spatiotemporal variations in physicochemical parameters across the early, medium, and late stages of a complete cyanobacteria bloom cycle. Diversity analysis further revealed that the temporal differences in the microbial community were substantially greater than spatial variations. Notably, during the medium-blooming stages in water, Microcystis emerged as the predominant detected cyanobacteria genus. Interestingly, the content of superoxide dismutase (SOD), malondialdehyde (MDA), and catalase (CAT) in sediment exceeded those in water by over 10 times, indicating that sediment-dwelling Cyanobacteria might constitute a crucial source of water blooms. Moreover, dissolved oxygen, pH, and water temperature were identified as the most influential environmental variables shaping the microbial community in the water. Stochasticity emerged as a prominent factor governing microbial community assembly across different bloom periods. Meanwhile, co-occurrence patterns suggested fewer interactions and instability between species in medium-blooming stages. Notably, the potential keystone phyla occupied crucial ecological niches. This research carries significant theoretical implications for managing cyanobacterial blooms in freshwater ecosystems.