Small size molybdenum carbides (2.5 nm for MoC and 5.0 nm for Mo2C) with clean surface on graphene were prepared for efficient and stable hydrogen evolution reaction catalysts.