Biomass-derived activated carbon materials have been attracted as low-cost and sustainable electrode materials for energy storage applications. In this work, we synthesised activated carbon from black gram whole skin for the first time, and the used source is a cost-effective carbon precursor. Nitrogen and phosphorous doping in activated carbon improved electronic conductivity, surface area and porosity. In supercapacitor application, the nitrogen and phosphorous doped activated carbon sample showed a high specific capacitance of 425 F g−1 at 0.5 A g−1 and cycling stability of about 92.5 % capacitance retention even after 5000 cycles in a three-electrode system. The observed stable specific capacitance in a three-electrode system encouraged us to make a two-electrode symmetric device, showing a specific capacitance of 100 F g−1 at 0.5 A g−1 with a higher energy density of 20 Wh kg−1. In addition, the lithium storage capability of doped carbon showed good capacity of 750 mAh g−1 at 0.1 A g−1 with a reversible capacity of 687 mAh g−1 after 100 cycles. The hetero-atom doped activated carbon derived from black gram skin showed outstanding electrochemical performance towards supercapacitor and lithium battery application, indicating a potential alternative to fossil fuel-derived carbon.