Photocatalytic H2 evolution has been regarded as a promising technology to alleviate the energy crisis. Designing graphitic carbon nitride materials with a large surface area, short diffusion paths for electrons, and more exposed reactive sites are beneficial for hydrogen evolution. In this study, a facile method was proposed to dope P into a graphitic carbon nitride framework by calcining melamine with 2-aminoethylphosphonic acid. Meanwhile, PCN nanosheets (PCNSs) were obtained through a thermal exfoliation strategy. Under visible light, the PCNS sample displayed a hydrogen evolution rate of 700 μmol·g-1·h-1, which was 43.8-fold higher than that of pure g-C3N4. In addition, the PCNS photocatalyst also displayed good photostability for four consecutive cycles, with a total reaction time of 12 h. Its outstanding photocatalytic performance was attributed to the higher surface area exposing more reactive sites and the enlarged band edge for photoreduction potentials. This work provides a facile strategy to regulate catalytic structures, which may attract great research interest in the field of catalysis.