Polycyclic aromatic hydrocarbons (PAHs) are classified as priority pollutants because of their persistent nature, carcinogenicity, and mutagenicity; therefore, they must be eliminated. Herein, synthesis of nitrogen‐doped metal hexacyanoferrate nanoparticles (N−MHCF; M=Cu, Zn) was achieved using the green protocol in co‐precipitation techniques for the oxidative removal of PAH pollutants, namely, anthracene (ANT) and phenanthrene (PHE). PXRD and XPS analysis confirmed the doping of Nitrogen in MHCF nanocomposite. The optimum conditions, concentration of PAHs (10 mg L−1), and catalyst dose (20 mg) at neutral pH under sunlight to eliminate PAHs were reported. The degradation followed the Langmuir model and Ist‐order kinetics. The highest photodegraFdation was found for N−CuHCF (ANT: 95 %; PHE: 93 %), as compared to N−ZnHCF (ANT: 90 %; PHE: 87 %), which might be due to a high negative zeta charge (−30.3 mV), surface area, and lower band gap energy (1.7 eV). The GC‐MS technique showed that photocatalysts (N−MHCF) break down PAH contaminants into minor metabolites in exposure to solar irradiation. Up to eight consecutive cycles of use were possible with nanocomposites without any appreciable decrease in activity. Largely because of favorable surface characteristics, N−MHCF nanostructure fabricated via the green method is of great importance with a bright future in industries.