Current sunlight-powered H2 production that employ carbonized polymer dots (CPDs)-graphitic carbon nitride (g-C3N4) systems has made significant progress. However, we still have a limited understanding of the mechanism by which CPDs contribute to the phtocatalytic efficiency. Surface molecule 1,2,3,5-tetrahydro-5-oxo-imidazo[1,2-α]pyridine-7-carboxylic acid (IPCA) has been verified to largely impact the photophysical properties of CPDs. Here, we report the design of g-C3N4, IPCA-g-C3N4 and CPDs-g-C3N4 catalysts to uncover the critical role of IPCA. The photocatalytic H2 production rates of g-C3N4 were improved by the hybridization with IPCA and CPDs (1172 ± 39; 2150 ± 92 vs. 828 ± 121 μmol g−1 h−1, respectively). The DFT calculations further unraveled that electron transfer pathway in ICPA-CN@H3O+ followed ICPA -> g-C3N4 -> H3O+ procedure. The results indicate that IPCA on CPDs is conducive to extending the light-responsive range, redistributing of photoinduced electron-hole pairs, increasing the electron density of g-C3N4, and thus improving H2 generation rates.