In order to improve the electrochemical behavior of graphitic carbon nitride (g-C3N4), ZnO nanoparticles were coupled with g-C3N4 nanosheets to form functional nanocomposite through hydrothermal method. The morphologies of nanocomposite were characterized by TEM and XRD. The results revealed that the addition of g-C3N4 can efficiently inhibit the growth of ZnO along the c-axis to obtain smaller size ZnO nanoparticles, which could bring the enhanced electrochemical response. Hydrogen peroxide was selected as a model to investigate the electrochemical behavior of nanocomposite in neutral condition. Compared with pure ZnO and g-C3N4 modified electrodes, the oxidation of H2O2 could be greatly enhanced at the ZnO/g-C3N4 modified electrode, revealing that the coupling of g-C3N4 with metal oxide could significantly improve its conductivity and electrochemical response. As a result, H2O2 could be sensitively detected at the modified electrode in the range of 5 μM to 0.2 mM. The proposed method could be successfully used in the detection of H2O2 in tap water samples with satisfactory results.