Ultrafine Ru nanoparticles dispersed on 3D N-doped carbon hollow nanospheres were firstly prepared by a feasible templating strategy. Due to the synergistic effect of the unique composite and structure, the resulting nanocomposite as a HER catalyst shows extraordinary electrocatalytic performance, superior to that of commercial Pt-C and most previously reported electrocatalysts.