Two-dimensional (2D) polymeric carbon nitride (PCN) materials have drawn broad attention as promising candidates for photocatalytic hydrogen evolution. However, it remains a significant challenge to simultaneously improve the visible light absorption, separation of photogenerated carriers, and activity. Herein, alkali metals doping PCN (e.g., C6N6 and C2N) are systematically investigated based on density functional theory. Different from the conventional notion of doping atoms as active sites, the actual active site is the intrinsic pyridine nitrogen surrounding the alkali metal. Compared to the change of Gibbs free energy value of −0.45 eV (−0.60 eV) for pristine C6N6 (C2N), Li or Cs doped PCN decreases to −0.03 eV (−0.10 eV) or 0.06 eV (−0.11 eV), respectively, benefitting from the adjustment of the 3p electronic state occupation for N atoms by charges transfer from alkali metal. Meanwhile, Li or Cs doping not only broadens the absorption of visible light by narrowing the band edge position but also promotes the separation of photogenerated electrons and holes by regulating their spatial separation, which is further confirmed by significant photocurrents for Li or Cs doped PCN based on nonequilibrium Green's function simulation. Our work could provide interesting insights into the mechanistic understanding and the highly efficient design of PCN materials in photocatalysis.