In this paper, an N-doped porous carbon (N-C) nanosphere containing a large amount of Co and Co 9 S 8 nanocrystals (Co/Co 9 S 8 /N-C) is described. Among them, ZnCo-PBA (Zn 3 [Co(CN) 6 ] 2 ) was synthesized by simple method as the sacrificial template and carbon source. After calcination in N 2 , Co ions are reduced to Co, and zinc ions are vaporized to produce a large number of pores. Finally, it was vulcanized by hydrothermal method to form Co 9 S 8 nanocrystals with high activity. Co/Co 9 S 8 /N-C nanomaterials have excellent specific surface area and mesoporous pores, which increase the charge transfer rate in the redox process and the performance. The material not only has excellent specific capacity (141.83 mAh g −1 /1542.64 F g −1 at 1 A g −1 ), but also retains good specific capacity after thousands of charges and discharges. To further test the value of Co/Co 9 S 8 /N-C electrodes, an asymmetric supercapacitor (ASC) was assembled with a very high energy density (94.632 Wh kg −1 ) at 29368.55 W kg −1 . The specific capacitance is about 80.70 % of the initial value after 5000 cycles. This strategy of using PBA as template to construct N-doped carbon skeleton embedded with metal sulfide provides a broad idea for supercapacitor electrode materials. • Porous Co/Co 9 S 8 /N-C nanospheres exhibit excellent specific surface area and porosity. • N, C and metal atoms all come from the same raw material. • The Co/Co 9 S 8 /N-C electrodes provide an excellent capacity of 141.83 mAh g-1 at 1 A g −1 . • Co/Co 9 S 8 /N-C//AC achieves a high energy density of 174.796 Wh kg −1 at 2954.19 W kg −1 .