Dye-containing pollutants are currently a threat to the environment, and it is highly challenging to eliminate these dyes photocatalytically under visible light. Herein, we designed and prepared a ZnO/CuO/g-C3N4 (ZCG) heterostructure nanocomposite by a co-crystallization procedure and applied it to eliminate pollutants from wastewater via a photocatalytic scheme. The structural and morphological features of the composite confirmed the formation of a ZCG nanocomposite. The photocatalytic capability of the ZCG photocatalyst was investigated via the decomposition of methylene blue dye. The outstanding activity level of 97.46% was reached within 50 min. In addition, the proficiency of the ZCG composite was 753%, 392%, 156%, and 130% higher than photolysis, g-C3N4, CuO, and ZnO, respectively. Furthermore, the photodeterioration activity on Congo red was also evaluated and found to be excellent. The enhanced catalytic achievement is attributed to the construction of heterojunctions among the constituent compounds. These properties boost the charge transfer and decrease the recombination rate. Moreover, the reusability of the ZCG product was explored and a negligible photoactivity decline was detected after six successful runs. The outcomes suggest the as-prepared nanocomposite can be applied to remove pollutants, which opens a new door to practical implementation.