Ru nanoparticles (NPs) and single atoms (SAs)-based materials have been investigated as alternative electrocatalysts to Pt/C for hydrogen evolution reaction (HER). Exploring the dominant role of atomic- and nano-ruthenium as active sites in acidic and alkaline media is very necessary for optimizing the performance. Herein, an electrocatalyst containing both Ru SAs and NPs anchored on defective carbon (RuSA+NP/DC) has been synthesized via a Ru-alginate metal-organic supramolecules conversion method. RuSA+NP/DC exhibits low overpotentials of 16.6 and 18.8 mV at 10 mA cm(-2) in acidic and alkaline electrolytes, respectively. Notably, its mass activities are dramatically improved, which are about 1.1 and 2.4 times those of Pt/C at an overpotential of 50 mV in acidic and alkaline media, respectively. Theoretical calculations reveal that Ru SAs own the most appropriate H* adsorption strength and thus, plays a dominant role for HER in acid electrolyte, while Ru NPs facilitate the dissociation of H2O that is the rate-determining step in alkaline electrolyte, leading to a remarkable HER activity.