Graphitic carbon nitride (g-C3N4)-based photocatalysts have shown great potential in the splitting of water. However, the intrinsic drawbacks of g-C3N4, such as low surface area, poor diffusion, and charge separation efficiency, remain as the bottleneck to achieve highly efficient hydrogen evolution. Here, a hollow oxygen-incorporated g-C3N4 nanosheet (OCN) with an improved surface area of 148.5 m2 g−1 is fabricated by the multiple thermal treatments under the N2/O2 atmosphere, wherein the C–O bonds are formed through two ways of physical adsorption and doping. The physical characterization and theoretical calculation indicate that the O-adsorption can promote the generation of defects, leading to the formation of hollow morphology, while the O-doping results in reduced band gap of g-C3N4. The optimized OCN shows an excellent photocatalytic hydrogen evolution activity of 3519.6 μmol g−1 h−1 for ~ 20 h, which is over four times higher than that of g-C3N4 (850.1 μmol g−1 h−1) and outperforms most of the reported g-C3N4 catalysts.