The marine waters in semi-enclosed bays are highly dynamic and strongly influenced by different levels of anthropogenic activity. This study explored the bacterial community composition and diversity in two typical urbanized coastal bay areas (Shenzhen Bay (S) and Dapeng Bay (D)) in Shenzhen, China, based on Illumina NovaSeq sequencing. Seawater analysis showed that coastal area S experienced a higher level of pollution, with higher nutrient concentrations observed. Alpha diversity analysis showed a higher bacterial diversity and richness in coastal area S than D. Taxonomic analysis revealed that the phylum Proteobacteria showed the highest abundance in all samples. Other dominant phyla were Firmicutes, Cyanobacteria, Tenericutes, and Actinobacteria. The bacterial community compositions were significantly different between the two coastal areas. A significant community difference was also found between the sampling sites of coastal area S. However, the difference between sampling sites in coastal area D was not significant. Physicochemical factors showed a more significant effect on bacterial community composition than nutrients. Pearson correlation tests and Network analysis further confirmed that salinity/conductivity, pH, and nitrate were the key factors driving the community difference. PICRUSt analysis revealed a higher degree of functional pathways in coastal area S relating to carbohydrate metabolism, membrane transport, and xenobiotics biodegradation. Our results provide in-depth insights into the bacterial community compositions in typical polluted coastal bays. They may provide information on underlying factors of the assembly process in microbial communities in the coastal zone.