PAH ring-hydroxylating dioxygenases (PAH-RHDα) gene, a useful biomarker for PAH-degrading bacteria, has been widely used to examine PAH-degrading bacterial community in different contaminated sites. However, the distribution of PAH-RHDα genes in oilfield soils and mangrove sediments and their relationship with environmental factors still remain largely unclear. In this study, gene-targeted metagenomics was first used to investigate the diversity of PAH-degrading bacterial communities in oilfield soils and mangrove sediments. The results showed that higher diversity of PAH-degrading bacteria in the studied samples was revealed by gene-targeted metagenomics than traditional clone library analysis. Pseudomonas, Burkholderia, Ralstonia, Polymorphum gilvum, Mycobacterium, Sciscionella marina, Rhodococcus, and potential new degraders were prevailed in the oilfield area. For mangrove sediments, novel PAH degraders and Mycobacterium were predominated. The spatial distribution of PAH-RHDα gene was dependent on geographical location and regulated by local environmental variables. PAH content played a key role in shaping PAH-degrading bacterial communities in the studied samples, which would enrich PAH-degrading bacterial population and decrease PAH-degrading bacterial diversity. This work brings a more comprehensive and some new insights into the distribution and biodegradation potential of PAH-degrading bacteria in soil and sediments ecosystems.