In this study,graphitic carbon nitride(g-C3N4) was synthesized by thermal condensation with melamine,and characterized by X-ray diffraction(XRD),scanning electron microscopy(SEM) and infrared spectroscopy.Graphitic carbon nitride was dispersed in Nafion solution by ultrasound to prepare suspension liquid which was modified onto the surface of a glassy carbon electrode(GCE) to prepare an electrochemical sensor(g-C3N4/ Nafion /GCE) for nitrobenzene.The voltammetric behaviours of nitrobenzene at the g-C3N4/ Nafion /GCE were studied by cyclic voltammetry and square-wave voltammetry(SWV).Under the optimal conditions,the cathodic peak current of nitrobenzene showed a highly linear increase with nitrobenzene concentrations over the range of 4.0×10-6-6.0×10-4 mol/L with a correlation coefficient(r) of 0.999 8.The detection limit was 4.0×10-7 mol/L.The concentration values in real water samples were determined by the national standard method.No SWV response corresponding to nitrobenzene was observed when the real water samples were analysed.Simulated water samples therefore were prepared,and standard-additions method was adopted to estimate the recorvery.The recoveries at two spiked concentration levels were 102.1%and 99.9%,respectively.No obvious differences were found between the proposed method and the gas chromatographic method.