This paper presents a fast, biogenic and green method for the synthesis of highly stable and small sized metal nanoparticles (MNPs). This technique has some benefits compared to the conventional physical and chemical methods. It is simple, rapid, cheap and environmentally friendly. In addition, it does not require any costly or hazardous chemicals. The extracts of Euphorbia maculata aerial parts were used in a green synthesis method in order to prepare magnetic Ni@Fe3O4 and CuO NPs. Fourier transforms infrared spectroscopy (FT-IR), field emission scanning electron microscopy (FE-SEM), X-ray diffraction (XRD), ultraviolet–visible (UV–Vis), energy dispersive X-ray spectrometry (EDS), Brunauer-Emmett-Teller (BET) and thermo gravimetric-differential thermal analysis (TGA) analytical techniques were used for analyzing the green synthesized compounds. The photocatalytic activity of the synthesized NPs was tested in the degradation of different organic dye pollutants such as congo red (CR), methylene blue (MB) and Rhodamine B (RhB) under UV irradiation. The effects of different parameters such as nanoparticle dosage, contact time, pH, and initial dye concentrations on the capacity of the photocatalyst adsorption were also studied. The comparison of the photocatalytic activity of the biosynthesized nanoparticles reveals that the catalytic activity of CuO NPs is higher than that of Ni@Fe3O4 NPs. Furthermore, good photocatalytic stability of the NPs in the degradation of MB under UV light irradiation was observed after the recycling. The photocatalyst efficiency did not considerably change after four cycles, which indicated excellent photocatalytic stability