Photocatalytic production of hydrogen peroxide (H2O2) from O2 and water offers a sustainable and environmentally friendly approach to solar-to-chemical energy conversion. To address the low H2O2 yield of pristine carbon quantum dots (CQDs) (354 mu mol g-1 h-1), we applied molecular level engineering of CQDs through surface NH functionalization (CQDs-NH), which significantly increased photocatalytic activity of H2O2 production to 2974 mu mol g-1 h-1. This enhanced performance is attributed to the C--N-NH- group in CQDs-NH, which improves light absorption, facilitates carrier separation and transfer, increases the selectivity of twoelectron oxygen reduction reaction, and promotes oxygen adsorption. Additionally, the hydrogen atom in the C--N-NH- group acts as a proton conductor, which significantly promoted the proton-coupled electron transfer process to produce H2O2 in the presence of O2. Moreover, a high H2O2 production capacity of 2764 mu mol g-1 h-1 was obtained even in the absence of an electron donor.