The different electrolyte conditions, e.g., pH value, for driving efficient HER and OER are one of the major issues hindering the aim for electrocatalytic water splitting in a high efficiency. In this regard, seeking durable and active HER electrocatalysts to align the alkaline conditions of the OER is a promising solution. However, the success in this strategy will depend on a fundamental understanding about the HER mechanism at the atomic scale. In this work, we have provided thorough understanding for the electrochemical HER mechanisms in KOH over Ni-and Co-based hollow pyrite microspheres by in operando X-ray spectroscopies and DFT calculations, including NiS 2 , CoS 2 , and Ni 0.5 Co 0.5 S 2 . We discovered that the Ni sites in hollow NiS 2 microspheres were very stable and inert, while the Co sites in hollow CoS 2 microspheres underwent reduction and generated Co metallic crystal domains under HER. The generation of Co metallic sites would further deactivate H 2 evolution due to the large hydrogen desorption free energy (−1.73 eV). In contrast, the neighboring Ni and Co sites in hollow Ni 0.5 Co 0.5 S 2 microspheres exhibited the electronic interaction to elevate the reactivity of Ni and facilitate the stability of Co without structure or surface degradation. The energy barrier in H 2 O adsorption/ dissociation was only 0.73 eV, followed by 0.06 eV for hydrogen desorption over the Ni 0.5 Co 0.5 S 2 surface, revealing Ni 0.5 Co 0.5 S 2 as a HER electrocatalyst with higher durability and activity than NiS 2 and CoS 2 in the alkaline medium due to the synergy of neighboring Ni and Co sites. We believe that the findings in our work offer a guidance toward future catalyst design.