The doping of porous carbon materials with nitrogen is an effective approach to enhance the electrochemical performance of electrode materials. In this study, nitrogen-doped porous carbon derived from peanut shells was prepared as an electrode for supercapacitors. Melamine, urea, urea phosphate, and ammonium dihydrogen phosphate were employed as different nitrogen dopants. The optimized electrode material PA-1-1 prepared by peanut shells, with ammonium dihydrogen phosphate as a nitrogen dopant, exhibited a N content of 3.11% and a specific surface area of 602.7 m2/g. In 6 M KOH, the PA-1-1 electrode delivered a high specific capacitance of 208.3 F/g at a current density of 1 A/g. Furthermore, the PA-1-1 electrode demonstrated an excellent rate performance with a specific capacitance of 170.0 F/g (retention rate of 81.6%) maintained at 20 A/g. It delivered a capacitance of PA-1-1 with a specific capacitance retention of 98.8% at 20 A/g after 5000 cycles, indicating excellent cycling stability. The PA-1-1//PA-1-1 symmetric supercapacitor exhibited an energy density of 17.7 Wh/kg at a power density of 2467.0 W/kg. This work not only presents attractive N-doped porous carbon materials for supercapacitors but also offers a novel insight into the rational design of biochar carbon derived from waste peelings.