Anthropogenic source of heavy metals in the estuary-coastal sediment could cause serious environmental concerns. Thus, much needs to be concerned about the linkages between bacterial community, microbial nitrogen processes and heavy metals accumulation in the ocean tidal flush urban estuary where the river meet the sea. In this study, Illumina sequencing analysis and quantitative PCR (qPCR) were adopted to detect the effect of heavy metals on the bacterial community and nitrogen transformation genes from vertical sediment profiles in the four tidal flush estuaries. Results indicated that bacterial community and structure varied greatly from the vertical and spatial distribution. The vertical distribution of heavy metals varied greatly in the different groups. It was concluded that the accumulation of heavy metals mainly occurred in the medium layer of the depth from 40 cm to 70 cm. Heavy metals were found to pose a significant influence on the bacterial community and nitrogen transformation genes. The abundance of denitrification genes was highly associated with Cr, Zn, As and the abundance of amoA was vulnerable to the influence of Ni. Both denitrification and nitrification genes were greatly affected by C and N content, which indicated that the enhanced nitrogen transformation activities mainly occurred in the top layer sediment. Our results indicated that the bacterial community and nitrogen transformation functional genes were sensitive to the variation of heavy metals and nutrient content, which will provide new insight into the microbial N-cycling process influenced by pollutant and show a potential strategy for discharge management in the circumstances of estuary-coastal zones.