© 2020 Elsevier LtdIn this paper, we proposed that CoNi-alloy nanoparticles (NPs) can be directly encapsulated carbon nanofibers (CNFs) via electrospinning process followed by heat treatment. By adjusting the concentration of the Co/Ni metallic salts, the electrochemical properties of the resultant nanofibers can easily be tuned. CoNi-alloy NPs embedded in CNF resulted in 1.4 times electrochemical performance compared to the pure CNF. The assembled symmetric supercapacitor (SC) shows a high a specific capacitance of 132 Fg−1 at 1 Ag−1 and it can deliver a specific energy of 4.60 Whkg−1 with a specific power of 250 Wkg−1 with 85.3% capacitance retention up to 10,000 cycles. This work can provide a key strategy for a rapid design of bimetallic alloy nanoparticles directly from their salts in carbon nanofiber for various applications.