Exploring e ffi cient noble-metal free electrocatalysts for the hydrogen evolution reaction (HER) is one of the most promising pathways for facing the energy crisis. Herein, MoC – Mo 2 C heteronanowires composed of well-de fi ned nanoparticles were accomplished via controlled carbonization, showing excellent HER activity, fast kinetic metrics and outstanding stability in both acid and basic electrolytes. In particular, the optimal one consisting of 31.4 wt% MoC displayed a low overpotential ( h 10 ¼ 126 and 120 mV for reaching a current density of (cid:2) 10 mA cm (cid:2) 2 ), a small Tafel slope (43 and 42 mV dec (cid:2) 1 ) and a low onset overpotential (38 and 33 mV) in 0.5 M H 2 SO 4 and 1.0 M KOH, respectively. Such prominent performance, outperforming most of the current noble-metal free electrocatalysts, was ascribed to the carbide surface with an optimized electron density, and the consequently facilitated HER kinetics. This work elucidates a feasible way toward e ffi cient electrocatalysts via heteronanostructure engineering, shedding some light on the exploration and optimization of catalysts in energy chemistry.