In this paper, an N-doped porous carbon (N-C) nanosphere containing a large amount of Co and Co9S8 nanocrystals (Co/Co9S8/N-C) is described. Among them, ZnCo-PBA (Zn3[Co(CN)6]2) was synthesized by simple method as the sacrificial template and carbon source. After calcination in N2, 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 Co9S8 nanocrystals with high activity. Co/Co9S8/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/Co9S8/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.