The heteroatoms C, O binary-doped g-C3N4 (C-O/CN) with hierarchical porous nanobelt architecture was synthesized via a straightforward template-free self-assembly method using dicyandiamide as g-C3N4 precursor and glutathione as C, O doping source. The as-prepared C-O/CN exhibits well-defined hierarchical nanobelt structure composed of porous nanosheets, resulting in obvious enhanced specific surface area (120 m2 g−1). Particularly, C, O heteroatoms, introduced into the structure of g-C3N4 by substituting N atoms, induce narrowed bandgap for more effective visible-light harvesting and negatively shifted conduction band position for stronger reducibility of electrons for H2 production. Such hierarchical porous C-O/CN nanobelts are demonstrated to be highly efficient in charge separation and transfer. Under optimal mass ratio of glutathione to dicyandiamide (0.1%), C-O/CN-0.1 shows a highest H2 evolution rate of 18.38 mmol h−1 g−1 under visible-light (λ > 420 nm) irradiation (about 79.9 times higher than that of the bulk g-C3N4) and a remarkable apparent quantum efficiency of 9.83% at 420 nm, which can be used as a promising low-cost photocatalyst for H2 evolution.