Protonation of graphitic carbon nitride (g-C3N4) based catalyst by acid treatment is proved to benefit for its photocatalytic performance. However, acid-hydrothermal method to synthesize g-C3N4 was seldom reported. In this work, phosphate-modified g-C3N4 as efficient photocatalyst for H2O2 production was prepared via acid-hydrothermal method. XRD, N2 adsorption, UV–Vis, FT-IR, SEM, XPS, TPD, EIS, and PL were used to characterize the obtained catalysts. Phosphate modification not only influences the morphology, structure property and optical property, but also promotes the O2 adsorption ability, leading to the improved separation rate of electrons-holes. Phosphate modified g-C3N4 catalyst shows the H2O2 concentration of 5.4 mmol L−1, more than 13.5 times higher than that of neat g-C3N4. The possible reaction mechanism is proposed.