One of the most significant issues facing the world today is environmental contamination due to the polycyclic aromatic hydrocarbons, or PAHs release of reactive chemicals into the environment. Here, a green technology was used to synthesis the Ag doped Bi2O3@Co3O4 nanocomposite utilizing an extract from Azadirachta indica leaves. The morphological and structural examination of Ag doped Co3O4@Bi2O3 revealed an image in the form of a hollow spherical or flake adsorbed on a Ag surface with an increase surface area. New peaks in the FT-IR spectra of Ag–O and Co–O–Bi at 678 cm−1 and 1130 cm−1, respectively, show the coupling of Ag. Following this, under various reaction conditions (pollutant: 10–30 mg/L; catalyst: 10–30 mg; pH: 3–11, dark sunlight) the doped nanocomposite was assessed for the efficient removal of NAP and PHE. Ag doped Co3O4@Bi2O3 displayed maximum degradation of NAP (96 %) and PHE (94 %) at 10 mg/L conc. of each PAH with a 25 mg catalytic dose at neutral pH in the presence of direct sunlight. First-order kinetics followed by initial Langmuir adsorption constituted the degradation process. Predominant reactive species and safer metabolite formation in the photocatalysis process of PAHs were studied by scavenger and GC–MS analysis. The green nano photocatalyst that was created demonstrated excellent stability, sensitivity, and reusability (up to 8 th cycles) during the degrading process, which likely qualified it for use in industrial uses.