This work addresses the derivation of hierarchical porous carbon material from waste biomass of spent coffee ground (SCG) via a facile pyrolysis/activation process, where the calcination of wet SCG at 800 °C induced pore development, which is attributed to the intrinsic moisture in raw SCG. Further treatment using a HNO3 and H2O2 solution at 80 °C resulted in a hierarchical pore structure of micro- and meso-pores in the carbon material with a high surface area of 1037.52 m2/g. Nitrogen, a rich heteroatom in raw SCG, is self-incorporated well in the carbon skeleton of the resultant porous carbon with a high nitrogen content of 3 w/w%. The prepared hierarchical porous carbon was tested as a material for Li–S batteries, and displayed a capacity of more than 600 mAh g−1 at 0.2 C up to 150 cycles. As a sustainable carbon material, the SCG derived porous carbon, which has abundant heteroatoms of O and N, can be employed as a potential energy storage material.