The heterogeneous electro-Fenton technology can settle a matter of narrow pH application range in the traditional electro-Fenton process. Direct O2 electro-reduction to •OH on the surface of metal-free catalysts can effectively solve the problem of easy leaching of metal-based catalysts under acidic conditions and improve the oxidation efficiency of H2O2. In this work, a stable bifunctional boron-nitrogen-containing catalyst was directly synthesized on the surface of graphite felt. The H2O2 yield (4.32 mg cm-2 h−1) and rhodamine B degradation rate (0.174 min−1) of boron-nitrogen-containing catalyst were significantly improved at the pH value of 7, compared with nitrogen-containing graphite felt catalyst. The catalyst had a rapid degradation ability for various dyes and actual dye wastewater, and the specific energy consumption of actual dye wastewater degradation was 4.02 kW h kg−1 COD-1 lower than that reported in literature (6.38–29.7 kW h kg−1 COD-1). DFT calculations and XPS results revealed the potential reaction mechanism. The introduction of −BCO2 group into the nitrogen-containing plane significantly enhanced the oxygen adsorption and oxygen reduction activity, and the directly formation of •OH was promoted jointly by graphite nitrogen and −BCO2 group. This work provided a new insight into the development of metal-free electro-Fenton catalyst.