BACKGROUND: Sustainable production of oxygen and hydrogen via catalyst-aided water splitting utilizing solar energy has attracted increasing interest. The primary issue in this field is the development of earth-abundant and active photoelectrocatalytic materials. Herein, a novel hierarchical g-C 3 N 4 /g-C 3 N 4 metal-free homojunction catalyst is synthesized through partial hydrolysis of melamine in alkali and subsequent thermal treatment.RESULTS: The hierarchical g-C 3 N 4 /g-C 3 N 4 metal-free homojunction composed of lamellas features large exposed surface area, abundant interface contact and more channels for mass transfer, making it highly effective for water splitting with a small overpotential of 500 mV at 10 mA cm −2 and low Tafel slope of 93.1 mV dec −1 for oxygen evolution reaction (OER) in 1.0 mol L −1 potassium hydroxide (KOH) solution, as well as 259 mV at 10 mA cm −2 and 109.33 mV dec −1 for hydrogen evolution reaction (HER) in 0.5 mol L −1 sulfuric acid (H 2 SO 4 ) solution. Furthermore, the overpotential and Tafel slope further decrease to 383.4 mV and 69.52 mV dec −1 for OER, 150.1 mV and 67.93 mV dec −1 for HER upon visible light irradiation, demonstrating the exceptional photo-responsive catalytic performance, which can be attributed to the direct Z-scheme homojunction resulting in effective charge transfer and •OH and superoxide free radicals produced under visible light irradiation.CONCLUSION: This work provides a facile but effective approach for the construction of metal-free OER/HER bifunctional catalyst with high photo-responsive performance, achieving higher activity for catalyst-assisted water splitting.