Commencing from low-cost transition metal-based electrocatalysts, improving the catalytic activity and resource utilization is one of the ways to reduce the overall cost of hydrogen production from water cracking and improve energy conversion efficiency. Herein, the bimetallic cobalt-iron boride nanoparticles grown on the B, N-doped carbon frame (noted as CoFeB@BNC) was successfully synthesized by one-step pyrolysis boronizing using CoFe-zeolite imidazole frame (CoFe-ZIF) as the precursor and H3BO3 as the boron source. The excellent OER activity of CoFeB@BNC composite is attributed to the synergy of metal boride sites and additional B, N-doped carbon sites. Its overpotential is 297 mV at 10 mA cm−2 and 332 mV at 50 mA cm−2. Meanwhile, Tafel slope is only 43 mV dec−1, showing faster OER kinetics. The introduction of appropriate amount of Fe creates high conductivity of CoFeB@BNC composite and significantly accelerates OER kinetics. The CoFe-ZIF precursor has a large number of structure defects, which provide abundant mesoporous and active sites for the CoFeB@BNC composite. The B, N-doped carbon frame improves the conductivity and stability of the material. This work provides a feasible strategy for the design and preparation of Fe-doped ZIF-67 precursor and its derived highly active and stable boride catalyst.