Harmful algae blooms (HABs) can have significant adverse effects on coastal ecosystems and aquaculture resiliency. We collected samples from March to August at eight different stations in Haizhou Bay (China), a region with a high frequency of HABs, and used Illumina Novaseq high-throughput sequencing and multivariate statistical analysis to characterize the bacterial communities and their relationships with different environmental factors. We identified 27 phyla, 49 classes, 158 orders, 294 families, and 522 genera. Gammaproteobacteria, Alphaproteobacteria, Bacteroidia, Acidimicrobiia, Bacilli, Actinobacteria, Cyanobacteria, Clostridia, and Acidobacteria were the most abundant classes, and Acidobacteria, Bacteroidetes, Firmicutes, Actinobacteria, Chloroflexi, Proteobacteria, and Cyanobacteria were the keystone phyla. Based on the Mantel test and redundancy analysis, temperature was the main environmental factor affecting the structure of the bacterial communities, followed by silicate, dissolved organic phosphorus (DOP), and dissolved oxygen (DO). Among the genera with high OTU abundance, Nautella was co-related positively with DO and negatively with salinity; Planktomarina was co-related positively with salinity and negatively with nitrate and nitrite. Certain families (Flavobacteriaceae, Rhodobacteraceae, and Clade_I (SAR11 clade)) and genera (Methylophaga, Alteromonas, Oleiphilus, Marinobacter, Bacillus, Nautella, and Vibrio) had associations with phytoplankton species that were responsible for HABs. This research provides new insights into the characteristics of the bacterial communities that occur in coastal areas that have HABs and provides detailed descriptions of the spatial and temporal changes in the structure of these communities.