Phosphorus-oxygen co-doped graphite carbon nitride (POx-CN) are successfully fabricated by in situ impregnation and two-stage thermal polycondensation to investigate the effect of Na+ and Cl- on the photocatalytic hydrogen evolution from artificial seawater splitting. The as-prepared POx-CN exhibits a hydrogen evolution rate of 1054.29 μmolg-1h-1 in artificial seawater, lower than fresh water, indicating that Na+ and Cl- play an inhibitory effect on hydrogen evolution reaction. The theoretical calculation indicates that the phosphorus-oxygen binary doping changed the electrostatic potential of the modified layer in carbon nitride molecule, accelerating the electron transfer rate from the structural O in triazine ring to P-N bond. In artificial seawater, the competition between Na+ and Pt2+ at active sites in the modified layer and electron capture by Cl- in the mutual conversion of Cl- and chlorine radicals result in the reduction of hydrogen evolution efficiency.