Eco-friendly and effective separation of photocatalytic nanoparticles from the reaction mixture is crucial to facilitate their repeated use in photocatalysis. The development of magnetic/semiconductor nanocomposites with high catalytic performance and easy separation is an efficient strategy for wastewater treatments. In this study, we explore the potential of combination of magnetic (CoFe2O4) and semiconductor (ZnS) synthesized via a green approach using Moringa oleifera leaf extract as magnetically separable photocatalysts for dye degradation. X-ray diffraction analysis confirmed the presence of the cubic spinel ferrite phase of CoFe2O4 and the cubic zinc blend phase of ZnS within the nanocomposites. The micrographs illustrated nearly spherical nanoparticles with average particle sizes of 12 nm for CoFe2O4 and 26 nm for CoFe2O4/ZnS, respectively. The presence of SO suggested the incorporation of ZnS on the surface of CoFe2O4/ZnS nanocomposites. The UV–visible spectra revealed an increase in the band gap energy from 3.7 to 4.5 eV with increasing ZnS concentrations. Magnetic properties analysis signified that the CoFe2O4/ZnS nanocomposites exhibited ferromagnetic characteristics. The optimal degradation efficiency of photodegradation methylene blue was observed for CoFe2O4/ZnS 50 %, achieving 78.3 % degradation within 80 min with intervals 20 min. The magnetically separable capability allows for the recycling of nanocomposites after three consecutive cycles. Therefore, CoFe2O4/ZnS nanocomposites emerge as promising candidates as separable photocatalysts for the removal of organic pollutants in environments.