Heterojunction can not only offer a wide range of solar light absorption but also facilitate the separation of photoinduced charge carriers, and thereby lead to enhanced photoelectrochemical efficiency. Herein, we report the heterostructured g-C3N4/ZnO nanorod arrays (NRAs) for enhanced photoelectrocatalytic performance. The g-C3N4 shell layer of about 20-30 nm was coated on the surface of ZnO nanorod uniformly through thermal annealing the melamine precursor. Compared to the pristine ZnO and g-C3N4, the as-prepared g-C3N4/ZnO NRAs exhibit enhanced photoelectrocatalytic activity for methylene blue (MB) decolorization under visible light illumination. This enhancement of photoelectrocatalytic performance may be mainly attributed to improved separation efficiency of charge carriers from photoexcited g-C3N4 to ZnO across the g-C3N4/ZnO interfaces.