Photocatalytic H2 production from seawater splitting is a promising method for sustainable energy conversion technology. The vanadium-oxygen binary doped carbon nitride (VOX-CN) is successfully prepared for H2 production. Benefiting from the electronic structure alteration, the maximum H2 yield on VOX-CN in artificial seawater reaches 4475.74 μmol h−1g−1, 10 times higher than that of CN in deionized water. The impact of ions on the photocatalytic activity of VO2-CN is followed by Na+ > Mg2+ > K+ > Ca2+. The adsorption of electrolyte ions promotes the formation of delocalized electron clouds on the surface of VO2-CN, facilitating more electrons to participate in H+ reduction. Screening based on six machine models, the decision tree regression algorithm is used to reveal the interaction between cation type, their concentration and H2 yield. Pearson heatmap indicates that Na+, Mg2+, and K+ ions are positively correlated with H2 yield, whereas Ca2+ shows a negative correlation. The interactions among Na+, Mg2+ and K+ atoms facilitate H2 production in multi-ion system, whereas Ca2+ ions do the opposite, especially for high concentration. This work proposes new insights into the interference on H2 yield between the structure alteration of CN framework and the change of ion type and concentration.