Green hydrogen production from electrochemical water splitting currently suffers from the key issues of high energy consumption and cost. Herein, we demonstrated the synthesis of highly efficient and stable clustered CoP nanowires electrocatalysts on nickel foam. Moreover, an ion exchange strategy was proposed to precisely control the doping content of iron to further modify the intrinsic electrochemical activity of CoP nanowires. The introduction of iron effectively alters the surface atomic configuration and electronic structure of CoP and increases the active sites, thus accelerating the overall reaction rate and enhancing the catalytic performance. It has been demonstrated that the CoFeP-30-30/NF electrode exhibits platinum-like catalytic activity with only an overpotential of 29.8 mV at 10 mA·cm−2 and outstanding stability toward hydrogen evolution reaction. The synthetic strategy of CoFeP/NF electrode proposed in this work will significantly promote the development of highly efficient transition metal phosphides electrocatalysts with lower overpotential and better stability.