The current research concentrated on the Co-precipitation synthesis of g-C3N4 (CN), ZnO, ZnO/CN, and Co-doped ZnO/CN nanocomposite, as well as the solar light enhanced photocatalytic treatment of Reactive Red 120 (RR120) from genuine wool textile effluent. The 3D flower-like structure of Co-doped ZnO distributed on the surface of CN thin sheets, according to structural studies employing XRD and SEM examinations Electrochemical experiments exhibited that the Co-doped ZnO/CN nanocomposite has a large electroactive surface area. The optical band-gap values of CN, ZnO, ZnO/CN, and Co-doped ZnO/CN nanocomposites were 2.68, 3.13, 2.38, and 2.23 eV, respectively, according to optical characterizations. The synergistic effects and heterojunction produced by Co-doped ZnO and CN can be linked to the narrow gap in nanocomposites. After 75, 60, 50, and 40 min of exposure to solar light, photocatalytic degradation assays for 250 mL of 20 mg/L RR120 solution in the presence of CN, ZnO, ZnO/CN, and Co-doped ZnO/CN nanocomposites demonstrated 100% dye treatment. The applicability of photocatalysts for decolorization of 250 mL of 10 mg/L RR120 prepared from actual wool textile wastewater was investigated, and the results showed that Co-doped ZnO/CN nanocomposites for treatment of RR120 from actual wool textile wastewater were highly efficient at photocatalytic degradation.