Anthropogenic activities can adversely impact biogeochemical processes essential for maintaining ecosystem health in semi-enclosed bays. However, the influence of anthropogenic contaminants such as potentially toxic elements on microbial communities that regulate biogeochemical cycles in semi-enclosed bays is poorly understood. We determined the concentrations of four potentially toxic elements (Cu, Zn, Pb, and As) in sediments from a typical tropical semi-enclosed bay in Guangdong, China. Source apportionment using Pearson's correlation analysis revealed that aquaculture activities were probably the primary source of Cu, Zn, and Pb. Using high-throughput sediment DNA sequencing, we found that Proteobacteria was the dominant phylum in sediments. There was no evidence suggesting site-specific variation in microbial function even though sediments adjacent to aquaculture discharge points had higher microbial diversity. In contrast, pollutant-specific variations were observed; for example, Zn and Pd showed potential adverse effects on the environmental information processing function, while As showed a negative correlation with metabolic function. Based on different environmental characteristics, future research should consider the impact of multiple factors on the bacterial community in aquaculture systems.