 Polystyrene foam (PF), commonly used in packaging and insulation purposes, has emerged as a recycling predicament due to its low density and is often found littering the natural environment. Herein, we have reported the utilization of discarded PF as a sacrificial material to synthesize porous carbon nanofibers (CNFs) as a sustainable technique to produce cost-effective, high-performance supercapacitor electrodes while addressing PF disposal. It was found that the solubility difference between PF and polyacrylonitrile (PAN) in N,N-dimethylformamide can be exploited to create micro-mesoporous multi-channel CNFs via electrospinning technique for enhanced ion adsorption leading to higher specific capacitance. CNF-40 (PF:PAN = 40:60) showed the best electrochemical performance with a specific capacitance of 271.6 F g−1 at a current density of 0.5 A g−1. Further, CNF-40 exhibited 100% capacitance retention after 5000 cycles, and the high energy and power densities of 18.8 Wh kg−1 and 8000 W kg−1, respectively. Moreover, in an all-solid-state supercapacitor, it demonstrated a high areal capacitance of 0.32 F cm−2, indicating great potential for application in solid-state devices.