Due to rapid urbanization, the Beibu Gulf, a semi-closed gulf in the northwestern South China Sea, faces escalating ecological and environmental threats. Understanding the assembly mechanisms and driving factors of bacterioplankton in the Beibu Gulf is crucial for preserving its ecological functions and services. In the present study, we investigated the spatiotemporal dynamics of bacterioplankton communities and their assembly mechanisms in the Beibu Gulf based on the high-throughput sequencing of the bacterial 16 S rRNA gene. Results showed significantly higher bacterioplankton diversity during the wet season compared to the dry season. Additionally, distinct seasonal variations in bacterioplankton composition were observed, characterized by an increase in Cyanobacteria and Thermoplasmatota and a decrease in Proteobacteria and Bacteroidota during the wet season. Null model analysis revealed that stochastic processes governed bacterioplankton community assembly in the Beibu Gulf, with drift and homogenizing dispersal dominating during the dry and wet seasons, respectively. Enhanced deterministic assembly of bacterioplankton was also observed during the wet season. Redundancy and random forest model analyses identified the physical properties (e.g., temperature) and nutrient content (e.g., nitrate) of water as primary environmental drivers influencing bacterioplankton dynamics. Moreover, variation partitioning and distance-decay of similarity revealed that environmental filtering played a significant role in shaping bacterioplankton variations in this rapidly developed coastal ecosystem. These findings advance our understanding of bacterioplankton assembly in coastal ecosystems and establish a theoretical basis for effective ecological health management amidst ongoing global changes.