Developing efficient, stable and ideal urea oxide (UOR) electrocatalyst is key to produce green hydrogen in an economical way. Herein, Ru doped three dimensional (3D) porous Ni3N spheres, with tannic acid (TA) and urea as the carbon and nitrogen resources, is synthesized via hydrothermal and low-temperature treated process (Ru–Ni3[email protected]). The porous nanostructure of Ni3N and the nickel foam provide abundant active sites and channel during catalytic process. Moreover, Ru doping and rich defects favor to boost the reaction kinetics by optimizing the adsorption/desorption or dissociation of intermediates and reactants. The above advantages enable Ru–Ni3[email protected] to have good bifunctional catalytic performance in alkaline media. Only 43 and 270 mV overpotentials are required for hydrogen evolution (HER) and oxygen evolution (OER) reactions to drive a current of 10 mA cm−2. Moreover, it also showed good electrocatalytic performance in neutral and alkaline seawater electrolytes for HER with 134 mV to drive 10 mA cm−2 and 83 mV to drive 100 mA cm−2, respectively. Remarkably, the as-designed Ru–Ni3[email protected] also owns extraordinary catalytic activity and stability toward UOR. Moreover, using the synthesized Ru–Ni3[email protected] nanomaterial as the anode and cathode of urea assisted water decomposition, a small potential of 1.41 V was required to reach 10 mA cm−2. It can also be powered by sustainable energy sources such as wind, solar and thermal energies. In order to make better use of the earth's abundant resources, this work provides a new way to develop multi-functional green electrocatalysts.