Hydrogen peroxide (H2O2) production via oxygen (O2) reduction reaction (ORR) in pure water (H2O) through graphitic carbon nitrides (g-C3N4)-based piezo-photocatalysts is an exciting approach in many current studies. However, the low Lewis-acid properties of g-C3N4 limited the catalytic performance because of the low O2 adsorption efficacy. To overcome this challenge, we utilized the interaction of g-C3N4 precursors with various solvents to synthesize g-C3N4, possessing multiple nitrogen-vacant species via thermal shocking polymerization. Our results suggest that the lack of nitrogen in g-C3N4 and the incident introduction of oxygen-functional groups enhance the Lewis acid-base interactions and polarize the g-C3N4 lattices, leading to the enormous enhancement, roughly 7 times from the optimal samples compared to pristine g-C3N4 in pure water via piezo-photocatalysis. Meanwhile, we also observed the correlation between the charge separation kinetic and the crystalline degree of the synthesized materials, which can elucidate how the nitrogen defects impacted the catalytic outcomes. Furthermore, the catalytic mechanisms were thoroughly studied, with the formation of H2O2 proceeding via radical and water oxidation pathways, in which the roles of light and ultrasound were carefully investigated. Thus, our findings not only reinforce the potential view of metal-free photocatalysts, accelerating the understanding of g-C3N4 working principles to generate H2O2 based on the oxygen reduction and water oxidation reactions, but also propose a facile one-step way for fabricating highly efficient and scalable photocatalysts to produce H2O2 without using sacrificial agents, pushing the practical application of in-situ solar H2O2 toward real-world scenarios.