Diazotrophs in the mangrove rhizosphere play a major role in providing new nitrogen to the mangrove ecosystem and their composition and activity are strongly influenced by anthropogenic activity and ecological conditions. In this study, the diversity of the diazotroph communities in the rhizosphere sediment of five tropical mangrove sites with different levels of pollution along the north and south coastline of Singapore were studied by pyrosequencing of the nifH gene. Bioinformatics analysis revealed that in all the studied locations, the diazotroph communities comprised mainly of members of the diazotrophic cluster I and cluster III. The detected cluster III diazotrophs, which were composed entirely of sulfate-reducing bacteria, were more abundant in the less polluted locations. The metabolic capacities of these diazotrophs indicate the potential for bioremediation and resiliency of the ecosystem to anthropogenic impact. In heavily polluted locations, the diazotrophic community structures were markedly different and the diversity of species was significantly reduced when compared with those in a pristine location. This, together with the increased abundance of Marinobacterium, which is a bioindicator of pollution, suggests that anthropogenic activity has a negative impact on the genetic diversity of diazotrophs in the mangrove rhizosphere.