Graphitic carbon nitride nanotubes (CN-NTs) photocatalyst has been synthesized by a hard-template method by using cyanamide as a precursor and silica nanotubes (SiO2-NTs) as a hard template. The structure and properties of CN-NTs catalyst are characterized by the techniques of scanning electron microscope (SEM), transmission electron microscope (TEM), X-ray powder diffraction (XRD), Fourier transform infrared spectroscopy (FT-IR), nitrogen absorption/desorption experiment, ultraviolet visible diffuse reflectance spectroscopy (UV-Vis DRS), fluorescence spectra and thermogravimetric analysis (TGA). As demonstrated by the experimental results, CN-NTs possess the chemical structure of graphitic carbon nitride (g-C3N4) and the morphology of uniform nanotubes, and belong to mesoporous materials. Compared with the bulk carbon nitride (B-CN) and the mesoporous graphitic carbon nitride (mpg-CN), the optical absorption band edge of CN-NTs blue-shifts to 440 nm, and the peak intensity of the fluorescence emission spectra for CN-NTs reduces. With the visible light irradiation (λ>420 nm), CN-NTs show an outstanding photocatalytic water splitting activity with the hydrogen evolution rate of 58 μmol/h, and also demonstrate excellent stability in photocatalytic activity and chemical structure. The investigation results indicate that the nanotube structure effectively promotes the exciton separation of g-C3N4 semiconductor, and improves the separation efficiency of photogenerated electrons and holes, thus remarkably optimizing the photocatalytic activity of g-C3N4 toward hydrogen evolution.