Reducing the consumption of noble metals in energy devices, such as fuel cells, zinc-air batteries, and water splitting cells, is a core issue for achieving an environmentally sustainable society. Herein, two highly efficient electrocatalysts are synthesized, composed of N, P codoped carbon (NPC) modified with noble metals phosphides (RhxP/NPC and RuP/NPC) through pyrolysis of a mixture of RhCl(3)xH(2)O or RuCl3 xH(2)O, respectively, with phytic acid. Unlike the reported rhodium and ruthenium phosphides, RhxP/NPC and RuP/NPC have a low loading of Rh (approximate to 0.4 wt%) and Ru (approximate to 0.5 wt%) and yet still exhibit excellent trifunctional activities for oxygen reduction, oxygen evolution, and hydrogen evolution reactions. For hydrogen evolution, RhxP/NPC shows a Pt-like activity and excellent durability in acidic medium. Notably, RuP/NPC becomes more active after 2000 cycles in the durability test. For oxygen reduction, both of the catalysts show a half-wave potential of 0.89 V, which is positively shifted 40 mV relative to that of Pt/C (0.85 V) in 0.1 m KOH. In addition, RhxP/NPC and RuP/NPC also exhibit activities superior to that of IrO2 in oxygen evolution. Finally, zinc-air batteries and water splitting cells assembled with RhxP/NPC and RuP/NPC catalysts display good performance.