N, P dual-doped watermelon peel-derived carbon (NPW) was prepared and found to exhibit a larger specific surface area of 1809 m 2 g À 1 and improved hierarchically interconnected pores than N-doped and P-doped carbons. The NPW electrode exhibits excellent electrochemical activity in a three-electrode setup with 1 M H 2 SO 4 , 6 M KOH, and 1 M Na 2 SO 4 electrolytes; with high specific capacitance (498.8, 397.6, and 378.6 F g À 1 at 1 A g À 1 , respectively) and an average capacitance retention of ∼ 96.9 % after 10,000 charge-discharge cycles at 10 A g À 1 . The NPW//NPW-based symmetric cell with 1 M H 2 SO 4 -PVA-electrolyte provided a high energy density of 71.84 Wh kg À 1 at 1 A g À 1 and a specific capacitance of 263.9 F g À 1 . In the neutral electrolyte, NPW showed a wider operating voltage window of up to 2.0 V with no discernible anodic current and delivered 97.11 Wh kg À 1 energy density.