The single atom catalysts (SACs) show immense promise as catalytic materials. By doping the single atoms (SAs) of precious metals onto substrates, the atomic utilization of these metals can be maximized, thereby reducing catalyst costs. The electronic structure of precious metal SAs is significantly influenced by compositions of doped substrates. Therefore, optimizing the electronic structure through appropriate doping of substrates can further enhance catalytic activity. Here, Pt single atoms (Pt SAs) are doped onto transition metal sulfide substrate NiS2 (Pt SAs-NiS2) and phosphide substrate Ni2P (Pt SAs-Ni2P) to design and prepare catalysts. Compared to the Pt SAs-NiS2 catalyst, the Pt SAs-Ni2P catalyst exhibits better hydrogen evolution catalytic performance and stability. Under 1 M KOH conditions, the hydrogen evolution mass activity current density of the Pt SAs-Ni2P catalyst reaches 0.225 A mgPt–1 at 50 mV, which is 33 times higher than that of commercial Pt/C catalysts. It requires only 44.9 mV to achieve a current density of 10 mA cm−2. In contrast, for the Pt SAs-NiS2 catalyst, the hydrogen evolution mass activity current density is 0.178 A mgPt–1, requiring 77.8 mV to achieve a current density of 10 mA cm−2. Theoretical calculations indicate that in Pt SAs-Ni2P, the interaction between Pt SAs and the Ni2P substrate causes the Pt d-band center to shift downward, enhancing the H2O desorption and providing optimal H binding sites. Additionally, the hollow octahedral morphology of Ni2P provides a larger surface area, exposing more reactive sites and improving reaction kinetics. This study presents an effective pathway for preparing high-performance hydrogen evolution electrocatalysts by selecting appropriate doped substrates to control the electronic structure of Pt SAs.