Porous electrocatalyst for hydrogen production. 3D hierarchical porous molybdenum carbide provides a low operating potential (97 mV at 10 mA cm−2). These beneficial textures of large specific surface area (302 m2 g−1) and hierarchical porous architecture containing dominant pore size distribution peak at 11 Å in width can provide large surface active sites and facilitate proton mass transport.