Affordable nitrogen and fluorine co-doped carbon nanostructure was prepared from the hazardous industrial waste of edible oil refinery, spent bleaching earth (SBE), and used as raw material for obtaining high-performance non-noble metal bifunctional oxygen electrocatalysts. Waste SBE contains 35 % residue non-saturated oil as a carbon source and the assistance of montmorillonite (MMT) as the template. This study converts waste SBE into a fluorine-doped carbon nanostructure through a pyrolysis process followed by removing the aluminosilicate layers of the MMT by HF etching. Furthermore, the impregnation of the support with Co and Fe nitrates readily gives rise to N, F co-doped carbon (NFC) electrocatalysts, as confirmed by XPS analysis. Electrochemical results evidenced that the Co-NFC catalyst proved to be a valuable bifunctional competitor for oxygen reduction reaction and oxygen evolution reaction in alkaline media, showing activity in both reactions and superior stability compared with the Fe-NFC catalyst in accelerated tests. This work offers a straightforward, economical, and eco-friendly strategy for designing N, F co-doped carbon-based electrocatalysts for oxygen reactions in electrochemical devices.