A series of CdS quantum dots (QDs) at low temperature were grown on the nanosheets (NSs) of g-C3N4 through an in situ successive ionic layer adsorption and reaction process. The visible light active band gap of ultrathin g-C3N4 NSs has attracted more attention due to its essential bandgap for the water splitting reaction. However, a single catalyst with a limited number of active sites does not exhibit significant photo/electrocatalytic activity for hydrogen production. In current strategies, the development of a photogenerated charge transfer-driven type-II CdS QDs/g-C3N4 heterostructure demonstrates an enhanced hydrogen evolution reaction with an amount of 14.8 mmol gcat–1 of H2 gas and an AQY of 27.6% as a result of a decreased charge transfer resistance and a significantly increased electrochemical surface area. Additionally, the as-prepared catalyst has shown overpotentials of 182 and 382 mV for hydrogen evolution reaction (HER) and oxygen evolution reaction (OER) reactions to reach the current density at 10 mA cm–2, respectively. In addition, the bifunctional electrocatalyst exhibits a 4- and 6-fold higher mass current density of heterostructure material for the OER and HER reactions as compared to g-C3N4, with a considerable faradaic efficiency under the potentiostatic system, respectively. Moreover, the remarkable photo/electrocatalytic activity of the CdS QDs/g-C3N4 heterostructure was well explained through the photoluminescence quenching effect and Mott–Schottky analysis.