Electrocatalysts for oxygen evolution reaction (OER) with excellent activity and favorable stability are received much attention, due to the urgent requirement for green energy. Herein, we report a low-cost, highly efficient and stable electrocatalyst, Ru–CoFeP (Ru doped CoFeP nanocubes). The superior OER performance of Ru–CoFeP is ascribed to the synergistic effects of the Ru doping, porous structure and exposed active sites. Ru–CoFeP catalyst owns a small overpotential of 185 mV at 10 mA cm−2, a Tafel slope of 67.6 mV dec−1 and a Cdl value of 9.1 mF cm−2, which is much better than those of undoped CoFeP catalyst. Density functional theory (DFT) calculations reveal that the electrons would move toward to Ru after the Ru doping on the active CoFeP (111) surface and the adsorption capacity to H2O molecules is also strengthened to elongate and break O–H bond. The Ru–CoFeP + Pt/C based rechargeable Zn-air battery exhibits excellent stability with slightly increased/decreased potential after 450 cycles at the current density of 5 mA cm−2, which shows a much better performance than that of RuO2+Pt/C battery. This work not only provides an efficient low-cost OER catalyst, but also demonstrates that Ru-doping would be a feasible strategy to enhance OER performance.