It is important for regenerative fuel cells, rechargeable metal–air batteries and water splitting to find reasonable designed nonprecious metal catalysts, which have efficient and durable electrocatalytic activities for oxygen reduction reaction (ORR), oxygen evolution reaction (OER) and hydrogen evolution reaction (HER). In this work, through a simple hydrothermal method and following annealing process, Mo2C and Ni nanoparticles were encapsulated in a nanoporous hierarchical structure of carbon (Ni/Mo2C/C). The ingenious structure delivers several favorable characteristics including abundant active sites resulting from hollow and mesoporous architecture, boosted reaction kinetics from metallic components, sufficient interfacial effect and synergistic effect from intimate integration of Mo2C, Ni and C. The multifunctional Ni/Mo2C/C hybrid electrocatalyst performs excellently for ORR, OER and HER, better than most of the reported electrocatalysts with three functions. A facile and novel strategy was developed to construct the multifunctional catalysts with excellent electrocatalysis behavior.