Herein, the synthesis, characterization, and photoelectrochemical and photocatalytic characteristics of hydrothermally prepared La2O3–g-C3N4, CoO–g-C3N4, and La2O3–CoO–g-C3N4 are discussed. The XRD analysis and crystalline phases unveiled the impregnation of La2O3 and CoO into g-C3N4. The microscopic analysis supports the formation of g-C3N4 nanoflakes and La2O3 and CoO nanoparticles embedded homogeneously in the La2O3–CoO–g-C3N4 nanocomposite, whereas the EDX comprehended their respective elemental composition and ratios. A bandgap energy of 2.38 eV for La2O3–CoO–g-C3N4 was calculated using the Tauc plot method, complementing high visible-light activity. The solar-driven water-splitting reaction exhibited significant photocurrent efficiency (~3.75 mA/cm2), augmenting the hydrogen generation by La2O3–CoO–g-C3N4 compared to that by pure g-C3N4, La2O3–g-C3N4, and CoO–g-C3N4 in 0.5 M Na2SO4 electrolyte. The synergistic effect of La2O3 and CoO impregnation with g-C3N4 led to effective division of the photogenerated charge transporters, enhancing the photocatalytic hydrogen generation by the photocatalysts. Furthermore, photocatalytic pollutant removal, namely greater than 90% decomposition of methylene blue (MB) from water, was investigated with a pseudo-first-order reaction kinetics under 1 sun visible-light irradiation. Thus, La2O3–CoO–g-C3N4 nanocomposite was found to be a prospective material for harnessing solar energy.