Rationally designing high-performance electrocatalysts with high density and multiactive sites is an effective strategy to accelerate the alkaline hydrogen evolution reaction (HER) kinetics, yet it remains challenging. Herein, a catalyst comprising numerous Ru–Mo-based single atoms and subnanoclusters incorporated into a hierarchical macro-mesoporous carbon framework with a P-doped skeleton (Ru–Mo/PC) was successfully developed via a simple template-assisted pyrolysis method. Spherical aberration correction electron microscopy and X-ray absorption fine structure measurements revealed that the dual-active sites consisted of Ru–C5 single atoms and ultrasmall Ru–Mo nanoclusters (mean diameter of 0.94 nm). In particular, the as-constructed RuMo1.5/PC catalyst exhibited a high activity towards the HER, requiring an overpotential of only 17.9 mV at 10 mA/cm2, which outperformed a commercial Pt/C catalyst in alkaline media. Electrochemical performance results also indicated that introducing moderate Mo species played a crucial role in further boosting the HER activity compared to Ru/PC. The present work provides a step forward in designing efficient and stable catalysts with high-density, atomically dispersed active sites for hydrogen production.