The pursuit of electrode materials with excellent performance in both supercapacitors and lithium-ion batteries holds the potential to streamline the construction of hybrid electrochemical energy storage systems and contribute to cost reduction. In this paper, we introduce a novel nanocomposite—carbon-coated Ni2P nanoparticles coated on CNTs (CNTs@(Ni2P@C))—via an in-situ one-step solid-state method. This design not only prevents the aggregation of Ni2P nanoparticles with a size of 5–8 nm but also mitigates its volume change during charging and discharging cycles. Simultaneously, it establishes a rapid electron transfer pathway between CNTs and Ni2P nanoparticles, enhancing the electron transport kinetics within the synthesized nanocomposite. The synthesized CNTs@(Ni2P@C) nanocomposite exhibits high performance in both SCs and LIBs. An ultra-high specific capacity of 378.5 mAh g−1 (2725.2 F g−1) at 1 A g−1 and a good rate capacity (189.3 mAh g−1 at 20 A g−1) are achieved when used in supercapacitors. The hybrid supercapacitor device assembled using the synthesized nanocomposite exhibits a high specific capacity of 84.3 mAh g−1 at 1 A g−1 and excellent capacity retention of 92 % after 10,000 cycles. A high energy density of 67.47 Wh kg−1 can be delivered at a power density of 0.84 kW kg−1. When used in LIBs, the synthesized nanocomposite exhibits a reliable reversible specific capacity of 329 mAh g−1 at 0.1 A g−1 after 100 cycles and a high capacity retention of 90 % after 5000 cycles at 2.0 A g−1. The proposed in-situ solid-state method and the synthesized CNTs@(Ni2P@C) nanocomposite will strongly promote the development of difunctional electrode materials for supercapacitors and lithium-ion batteries.