Heteroatom-doped porous carbon has become a key material in the field of supercapacitors (SCs) and the oxygen reduction reaction (ORR). Here, eucalyptus pulping red liquor was used as the starting material for a straightforward one-step NH 4 Classisted carbonization technique that produced a nitrogen and sulfur codoped bifunctional porous carbon material. The sulfur in sodium lignosulfonate was used as a S atom dopant. NH 4 Cl added to the red liquor can not only produce NaCl as a template but also as a nitrogen source. The resulting carbons possess rich hierarchical porous structures and high specific surface area (1092 m 2 g −1 ) and I D /I G ratio (1.04), leading to remarkable electrocatalytic activity with a specific capacitance of 326 F g −1 at 0.5 A g −1 for capacitance and an identical onset and half-wave potentials of 0.988 V vs reversible hydrogen electrode (RHE) and 0.847 V vs RHE for the ORR, as compared with the benchmark Pt/C catalyst. Furthermore, when BLC-N/S-1000 was used as an electrocatalyst in an air electrode of a zinc−air battery, it showed superior longterm stability for 356 h at 5 mA cm −2 and 20 min/cycle. Results in the present work pave a new green method to convert abundant low-cost biomass into high-end heteroatom-doped carbons with rich hierarchical porous structures for electrochemical energy devices.