Developing the robust non-precious metal bifunctional electrocatalyst is highly imperative for the hydrogen evolution from overall water splitting. Herein, a Ni foam (NF)-supported ternary Ni/Mo bimetallic complex (Ni/Mo-TEC@NF), hierarchically constructed by coupling the in-situ formed MoNi4 alloys and Ni2Mo3O8 with Ni3Mo3C on NF, has been developed through a facile method involving the in-situ hydrothermal growth of the Ni-Mo oxides/polydopamine (NiMoOx/PDA) complex on NF and a subsequent annealing in a reduction atmosphere. Synchronously, N and P atoms are co-doped into Ni/Mo-TEC during the annealing procedure using phosphomolybdic acid and PDA raw materials as P and N sources, respectively. The resultant N, P-Ni/Mo-TEC@NF shows outstanding electrocatalytic activities and tremendous stability for hydrogen evolution reaction (HER) and oxygen evolution reaction (OER), due to the multiple heterojunction effect-promoted electron transfer, the large number of exposed active sites, and the modulated electronic structure by the N and P co-doping. It only needs a low overpotential of 22 mV to afford the current density of 10 mA·cm-2 for HER in alkaline electrolyte. More importantly, as the anode and cathode, it requires only 1.59 and 1.65 V to achieve 50 and 100 mA·cm-2 for overall water splitting, respectively, comparable to the benchmark Pt/C@NF//RuO2@NF couple. This work could spur the search for economical and efficient electrodes by in situ constructing multiple bimetallic components on 3D conductive substrates for practical hydrogen generation.