The energy and environmental crisis pose a great challenge to human development in the 21st century. The design and development of clean and renewable energy and the solution for environmental pollution have become a hotspot in the current research. Based on the preparation of transition metal phosphates, transition metals were used as raw materials, Prussian blue-like NiFe(CN)6 as a precursor, which was in situ grown on nickel foam (NF) substrate. After low temperature phosphating treatment, a bimetallic phosphide electrocatalyst (NiFe)2P/NF was prepared on NF substrate. Using 1 mol·L−1 KOH solution as a basic electrolyte, based on the electrochemical workstation of a three-electrode system, the electrochemical catalytic oxygen evolution performance of the material was tested and evaluated. Experiments show that (NiFe)2P/NF catalyst has excellent oxygen evolution performance. In an alkaline medium, the overpotential required to obtain the catalytic current density of 10 mA·cm−2 is only 220 mV, and the Tafel slope is 67 mV·dec−1. This is largely due to: (1) (NiFe)2p/NF nanocatalysts were well dispersed on NF substrates, which increased the number of active sites exposed; (2) the hollow heterostructure of bimetallic phosphates promotes the electron interaction between (NiFe)2P and NF, increased the rate of charge transfer, and the electrical conductivity of the material is improved; and (3) theoretical calculations show that (NiFe)2P/NF hollow heterostructure can effectively reduce the dissociation barrier of water, promote the dissociation of water; furthermore, the kinetic reaction rate of electrocatalytic oxygen evolution is accelerated. Meanwhile, the catalyst still has high activity and high stability in 30 wt% concentrated alkali solution. Therefore, the construction of (NiFe)2P/NF electrocatalysts enriches the application of non-noble metal nanomaterials in the field of oxygen production from electrolytic water.