Electrocatalytic decomposition of water using bifunctional catalysts is a potential method for clean hydrogen energy production. In order to solve the weakness of present catalysts, this study rationally designed a novel iron-nickel bifunctional electrocatalyst of FexNi1−x @C, P composites prepared by pyrolysis and phosphorus doping of a FeNi-bimetal-organic framework (FeNi-MOF). The innovative combination of FeNi bimetallic co-doping, low-temperature curing and phosphating has bred an excellent electrocatalyst for the hydrogen evolution reaction (HER) in alkaline solution. When the mass ratio of phosphate to FexNi1−x @C250–800 was 10:1, FexNi1−x @C250–800, P(10:1) showed the highest hydrogen evolution activity, obtaining a low 189 mV hydrogen evolution overpotential with a Tafel slope of 91.9 mV·dec−1 at 10 mA·cm−2 current density. Meanwhile, FexNi1−x @C250–800, P exhibited good stability during HER process. This work would open up a novel pathway for designing efficient and stable bifunctional electrocatalysts for water electrolysis as well as sustainable chemistry applications.