The design and synthesis of g-C3N4 with favourable physical-chemical architecture are important factors in influencing its photoactivity. Herein, a phosphorus (P) vapor assisted synthetic strategy was employed to fabricate the P-doped hollow g-C3N4 photocatalysts with ultrathin shell structure (< 25 nm in thickness). The doping of P and the compression of shell thickness of the hollow g-C3N4 were induced simultaneously by the P vapor during the heating process. The as-prepared P-doped ultrathin hollow g-C3N4 sphere (P/UH-CNS) photocatalysts exhibited enlarged surface area and light responsive range, and improved charge transportation efficiency by suppressing the charge recombination and self-trapping within g-C3N4. These resulted in a high photocatalytic hydrogen evolution rate of 9653 μmol h−1 g−1. The charge dynamics in this P/UH-CNS system was revealed in detail by using the ultrafast time-resolved spectroscopy.