Metal phosphides are promising efficient non-Pt electrocatalysts for hydrogen evolution reaction (HER). Herein, we report a simple strategy to controllably synthesize pure RuP and RuP2 and evaluate their HER performances in all pH range. Different from other transition metal phosphides, the HER performance of the RuPx in all pH range obviously improves as the phosphorus content decreases. By systematic research, it has been found that the RuP-475 with more Ru had much better conductivity and more catalytically active sites than the P rich RuP2-550. In addition, the RuP-475 exhibits excellent HER performance with small overpotential at a current density of 10 mA cm–2 (46, 47, 22 mV in pH 0, 7, and 14, respectively).