Recently, hybrid materials have received considerable attention due to the spatial dissociation of photogenerated electron-hole pairs, enabling them to harvest solar light from ultraviolet to visible regions. This study investigates the photocatalytic activity of magnetic CoFe2O4/g-C3N4/ZnO (CF-gCN/ZnO) nanocomposite as a visible-light photocatalyst. CoFe2O4 and ZnO were decorated on the surface of as-prepared g-C3N4 sheets using the pre- cipitation technique. The structural, morphology, optical, and magnetic properties of the photocatalysts were investigated. Rietveld refinement confirmed the hexagonal wurtzite structure with the P63mc space group of ZnO. Diffuse reflectance spectroscopy (DRS) and photoluminescence (PL) measurements showed that the optical properties and the electron-hole behavior of ZnO are affected by g-C3N4 nanosheets. The photocatalytic capa- bility was assessed against methylene blue (MB) dye as a model pollutant under visible light irradiation. Compared to CoFe2O4/ZnO and CoFe2O4/gC3N4 composites, the heterojunction CF-gCN/ZnO photocatalyst achieved a photodegradation efficiency of 89% for degradation of MB after 100 min of irradiation. The formation of heterojunction structures at the interface of g-C3N4 and ZnO leads to improved photocatalytic activity due to the separation of the photo-generated electron-hole pairs. Additionally, the magnetic properties of the CoFe2O4 component provided the separation of the photocatalyst from the solution under an external magnetic field. The present study offers a facile method for designing CoFe2O4/g-C3N4/ZnO nanocomposite as a potential ternary photocatalyst with high efficiency and good separability for environmental remediation applications.