Isolated single-atom platinum (Pt) embedded in the sub-nanoporosity of 2D g-C3 N4 as a new form of co-catalyst is reported. The highly stable single-atom co-catalyst maximizes the atom efficiency and alters the surface trap states of g-C3 N4 , leading to significantly enhanced photocatalytic H2 evolution activity, 8.6 times higher than that of Pt nanoparticles and up to 50 times that for bare g-C3 N4 .