A novel ternary heterojunction composite photocatalyst g-C3N4/TiO2/NiWO4 was fabricated using a simple hydrothermal method. The synthesized samples were characterized using X-ray diffraction (XRD), scanning electronic microscopy (SEM), energy-dispersive spectrum (EDS), Fourier transform infrared spectroscopy (FT-IR), X-ray photoelectron spectroscopy (XPS), ultraviolet–visible (UV–Vis) absorption spectra, photoluminescence (PL) spectra, transient photocurrent responses, and electrochemical impedance spectroscopies (EIS). The results indicated that the composite of g-C3N4/TiO2/NiWO4 had been successfully synthesized. By constructing a ternary heterojunction, the electron migration rate and light absorption of the material are further improved; the photogenerated electron–hole recombination is inhibited. The ternary composite photocatalyst shows the highest photocatalytic activity for the degradation of rhodamine B (RhB) than that of g-C3N4, TiO2, NiWO4, and g-C3N4/TiO2 photocatalyst. The degradation efficiency of RhB using g-C3N4/TiO2/NiWO4 can reach 99% after visible-light irradiation for 40 min. Finally, the migration mechanism of charge carriers in the ternary system has been schematically illustrated by the active species capture experiment. Our research can pave the way for the fabrication of ternary heterojunction composite photocatalyst with high photocatalytic activity for the environmental contaminants treatment.