Sustainable hydrogen production is an essential prerequisite of a future hydrogen economy. Water electrolysis driven by renewable resource-derived electricity and direct solar-to-hydrogen conversion based on photochemical and photoelectrochemical water splitting are promising pathways for sustainable hydrogen production. All these techniques require, among many things, highly active noble metal-free hydrogen evolution catalysts to make the water splitting process more energy-efficient and economical. In this review, we highlight the recent research efforts toward the synthesis of noble metal-free electrocatalysts, especially at the nanoscale, and their catalytic properties for the hydrogen evolution reaction (HER). We review several important kinds of heterogeneous non-precious metal electrocatalysts, including metal sulfides, metal selenides, metal carbides, metal nitrides, metal phosphides, and heteroatom-doped nanocarbons. In the discussion, emphasis is given to the synthetic methods of these HER electrocatalysts, the strategies of performance improvement, and the structure/composition-catalytic activity relationship. We also summarize some important examples showing that non-Pt HER electrocatalysts could serve as efficient cocatalysts for promoting direct solar-to-hydrogen conversion in both photochemical and photoelectrochemical water splitting systems, when combined with suitable semiconductor photocatalysts.