In this work, nitrogen doped g-C3N4 (NCN) with the extremely narrow band gap was prepared and applied for the photodegradation of phenols. Experiments and DFT (the density functional theory) computation identified that N-doping introduced in the g-C3N4 matrix by substituting C atoms. DFT, PL (photoluminescence) spectra, optical property characteristic and PEC (photoelectrochemical) indicated that NCN possess extremely narrow band gap, efficient photogenerated carrier separation and the charge transfer, which enhanced the absorption of visible light and further promoted the photocatalytic activity. As a result, NCN(2:2) showed about twice higher photodegradation efficiencies and 3 times rate constant than pristine g-C3N4. The radical trapping experiments showed that •O2- radical and h+ served as crucial active species during the whole photodegradation reaction. This work can provide a strategy to enhance the photocatalytic activity of photocatalysts via introduce foreign atoms in matrix.