The efficiency of hydrogen production from electrolysis of water is severely limited by the sluggish kinetics of hydrogen evolution reaction (HER). Here we report our findings in the development of a very active and durable HER electrocatalyst derived from a one-pot synthesis of highly porous molybdenum carbide (Mo2C) nanoparticles uniformly dispersed on nitrogen-doped graphene-like carbon. The nanocomposite catalyst displays excellent HER activity and durability in an acidic electrolyte among all non-noble-metal catalysts ever reported. The remarkable performance is attributed to the unique nanostructure of the Mo2C phase, the conductive nitrogen-doped graphene-like carbon network, the high porosity of the hybrid, and the synergistic effect between the Mo2C and the carbon substrate. Further, the facile and low-cost synthetic strategy for preparation of such nanostructures may open up opportunities for exploiting other high-performance electrocatalysts for various applications.