Porous carbon nanofiber (CNF) electrodes for supercapacitors were prepared by using polyacrylonitrile (PAN) and cucurbituril (CB), which is a macrocyclic compound comprising glycoluril units containing hollow cores. Mixture of PAN and CB in dimethyl sulfoxide was electrospun, and thermally treated to produce CNF electrodes. Their thermal stability, surface morphology, carbon microstructures, and surface porosity were investigated. Electrochemical properties were measured using three-electrode with synthesized CNFs without further treatment as a working electrode and 1 M Na2SO4 as an electrolyte. CNFs derived from PAN and CB exhibited a high specific capacitance of 183.5 F g− 1 and an energy density of 25.4 Wh kg− 1 at 0.5 A g− 1 with stable cyclic stability during 1000 cycles, which is significantly higher than those for CNFs derived from PAN only. This demonstrated that the introduction of CB successfully improved the energy storage performance of CNF electrodes.