Herein, we report a simple chemical activation treatment process to recycle antibiotic bacteria residues (ABRs), one kind of pharmaceutical wastes in pharmaceutical enterprises, into N, S co-doped hierarchical porous carbon (NSHC). The obtained N, S co-doped hierarchical porous carbon shows excellent characteristics, such as rich N, S doping (7.46 at% for N and 1.21 at% for S), high surface area (1695.6 m2 g−1), and large pore volume (0.96 cm3 g−1). As a result, the N, S co-doped hierarchical porous carbon shows superior electrochemical property, including high initial discharge capacity (1779mAh g−1), and good cyclic capability (756mAh g−1 after 100 cycles at 0.2 A g−1), and outstanding rate capacity (396mAh g−1 after 500 cycles at 1 A g−1). In addition, ABRs show self-induced graphitization feature during thermal treatment, which can improve the conductivity of the obtained porous carbon without the extra addition of metallic catalysts. Therefore, this paper demonstrates a low cost way to recycle pharmaceutical wastes into high value-added materials for energy applications.