The development of novel non-noble electrocatalysts with controlled structure and surface composition is critical for efficient electrochemical hydrogen evolution reaction (HER). Herein, the rational design of porous molybdenum carbide (β-Mo 2 C) spheres with different surface engineered structures (Co doping, Mo vacancies generation, and coexistence of Co doping and Mo vacancies) is performed to enhance the HER performance over the β-Mo 2 C-based catalyst surface. Density functional theory calculations and experimental results reveal that the synergistic effect of Co doping with Mo vacancies increases the electron density around the Fermi-level and modulates the d band center of β-Mo 2 C so that the strength of the MoH bond is reasonably optimized, thus leading to an enhanced HER kinetics. As expected, the optimized Co 50 -Mo 2 C-12 with porous structure displays a low overpotential (η 10 = 125 mV), low-onset overpotential (η onset = 27 mV), and high exchange current density (j 0 = 0.178 mA cm −2 ). Furthermore, this strategy is also successfully extended to develop other effective metal (e.g., Fe and Ni) doped β-Mo 2 C electrocatalyst, indicating that it is a universal strategy for the rational design of highly efficient metal carbide-based HER catalysts and beyond.