Heteroatom-doped electrodes offer promising applications for enhancing the longevity and efficiency of vanadium redox flow battery (VRFB). Herein, we controllably synthesized N, P co-doped graphite fiber electrodes with conductive network structure by introducing protonic acid and combining electrodeposition and high temperature carbonization. H2SO4 and H3PO4 act as auxiliary and dopant, respectively. The synergistic effect between N and P introduces additional defect structures and active sites on the electrodes, thereby enhancing the reaction rate, as confirmed by density functional theory calculations. Furthermore, the conductive network structure of carbon fibers improves electrode-to-electrode connectivity and reduces internal battery resistance. The optimized integration of these strategies enhances VRFB performance significantly. Consequently, the N, P co-doped carbon fiber modified graphite felt electrodes demonstrate remarkably high energy efficiency at 200 mA cm−2, surpassing that of the blank battery by 7.9 %. This integrated approach to in-situ controllable synthesis provides innovative insights for developing high-performance, stable electrodes, thereby contributing to advancements in the field of energy storage.