Transition metal selenide materials are extensively investigated as electrocatalysts for the hydrogen evolution reaction (HER). Despite having good electrical transportability, they suffer from low abundance catalytic active sites and relatively poor long-term stability. Herein, we demonstrate phosphorous doping in NiSe as an effective strategy to simultaneously boost electrocatalytic activity and stability. The phosphorous doped NiSe catalyst needs the lowest overpotentials of 90,101, 212, and 296 mV at 10 mAcm(-2) in alkaline, acidic, neutral, and seawater electrolytes, respectively, as well as continuous stable operation over 100 h. The high exchange current density of 1.379 mAcm(-2), the excellent mass activity of 23.95 Ag-1, and a turnover frequency (TOF) value of 0.339 s(-1) at 150 mV indicate the promising electrocatalytic HER performance of the P-doped NiSe catalyst. Our experimental data and theoretical calculations confirm that the advantage of HER activity and stability of P-doped NiSe originates from enriched catalytic active sites with near-zero H adsorption free energy and tuned electronic structure. This work provides a blueprint for the design and synthesis of best-in-class selenide-based HER & nbsp;catalysts.