Exorbitant cost and limited availability of platinum-based electrocatalysts for the oxygen reduction reaction (ORR) in metal-air batteries and alkaline fuel cells pose significant obstacles to the large-scale commercialization of these clean-energy technologies. Herein, we employed a cost-effective and sustainable bacterial cellulose biomass as the precursor to prepare a nitrogen and fluorine codoped metal-free ORR electrocatalyst (BCC-NF-900) by direct pyrolysis regulation. The BCC-NF-900 inherited the three-dimensional framework of bacterial cellulose, exhibiting a robust porous structure with a Brunauer-Emmett-Teller surface area of 196.9 m2 center dot g-1. The pyridinic N (0.6 at%) and semi-ionic F (0.34 at%) species formed in the inert sp2 carbon skeletons synergistically regulated the electron spin and charge density of the adjacent C atoms. Such rational combination of a rapid transport pathway and effective active site led to high ORR activity (onset potential 0.89 V vs. RHE), methanol resistance, and electrochemical stability (merely 6.9% current loss) in alkaline electrolyte. Importantly, compared to the mere F-doped BCC-F-900 (onset potential 0.82 V vs. RHE) and N-doped BCC-N-900 (onset potential 0.77 V vs. RHE) catalysts, the BCC-NF-900 catalyst exhibited a markedly enhanced ORR performance, as evidenced by the measured onset potential. This study provides an available reference for the design of efficient metal-free catalysts for ORR, presenting a promising alternative to Pt/C catalysts in metal-air batteries and alkaline fuel cells.