Doping engineering is an effective strategy for graphitic carbon nitride (g-C3N4) to improve its photocatalytic hydrogen evolution reaction (HER) performance. In this work, a novel nitrogen and sulfur co-doped g-C3N4 (N, S-g-C3N4) is elaborately designed on the basis of theoretical predictions of first-principle density functional theory (DFT). The calculated Gibbs free energy of adsorbed hydrogen (ΔGH*) for N, S-g-C3N4 at the N-doping active sites is extremely close to zero (0.01 eV). Inspired by the theoretical predictions, the N, S-g-C3N4 is successfully fabricated through ammonia-rich pyrolysis synthesis strategy, in which ammonia is in-situ obtained by pyrolyzing melamine. Subsequent characterizations indicate that the N, S-g-C3N4 possesses high specific surface area, outstanding light utilization, good hydrophilicity, and efficient carrier transfer efficiency. Consequently, the N, S-g-C3N4 displays an extremely high H2 evolution rate of 8269.9 μmol g-1 h-1, achieves an apparent quantum efficiency (AQE) of 3.24 %, and also possesses outsatnding durability. Theoretical calculations further demonstrate that N and S dopants can not only introduce doping energy level to reduce the band gap, but also induce charge redistribution to facilitate hydrogen adsorption, thus promoting the photocatalytic HER process. Moreover, femtosecond transient absorption (fs-TA) spectroscopy further corroborates the efficient photogenerated carrier transport of N, S-g-C3N4. This research highlights a promising and reliable strategy to achieve superior photocatalytic activity, and exhibits significant guidance for precise designing high-efficiency photocatalysts.