Molybdenum carbide (Mo2C) has been considered as a promising non-noble-metal hydrogen evolution reaction (HER) electrocatalyst for future clean energy devices. In this work, we report a facile, green, low-cost and scalable method for the synthesis of a Mo2C-based HER electrocatalyst consisting of ultrafine Mo2C nanoparticles embedded within bacterial cellulose-derived 3D N-doped carbon nanofiber networks (Mo2C@N-CNFs) using 3D nanostructured biomass as a precursor. The electrocatalyst exhibits remarkable HER activity (an overpotential of 167 mV achieves 10 mA cm−2 and a high exchange current density of 4.73 × 10−2 mA cm−2) and excellent stability in acidic media as well as high HER activity in neutral and basic media. Further theoretical calculations indicate a strong synergistic effect between Mo2C nanoparticles and N-CNFs in the Mo2C@N-CNF catalyst, which leads to an impressive HER performance. Embedding metal-based nanoparticles in bacteria-generated aerogels is a promising way to produce hydrogen fuel using water and electricity. Most water electrolysis methods use platinum catalysts to make hydrogen–oxygen bond splitting easier. But platinum's scarcity has prompted investigations into alternatives such as molybdenum carbide (Mo2C), a catalyst that shows increased activity when coupled with carbon nanofibers. Shu-Hong Yu and colleagues from Hefei, University of Science and Technology of China, now report that bacterial cellulose — a low-cost biomass synthesized by microbes — can act as a favorable support for Mo2C nanocatalysts. Straightforward immersion of bacterial cellulose in an ammonium molybdate precursor solution, followed by freeze drying and pyrolysis, yielded a three-dimensional porous network dotted with spatially separated Mo2C nanoparticles and nitrogen dopants. Tests showed the catalyst had excellent water splitting capabilities over the pH range 0 to 14. A new type of non-noble-metal hydrogen evolution reaction (HER) electrocatalyst based on ultrafine Mo2C nanoparticles embedded within 3D N-doped carbon nanofiber networks was fabricated by using a cheap, green, 3D nanostructured biomass (bacterial cellulose) as precursor. It exhibits remarkable electrocatalytic HER performance from pH 0 to pH 14.