Nanostructured cobalt sulfide based materials with rational design are attractive for high-performance lithium-ion batteries. In this work, we report a multistep method to synthesize ultrafine cobalt sulfide nanoparticles encapsulated in hierarchical N-doped carbon nanotubes (CoSx@HNCNTs). Co-based zeolitic imidazolate framework (ZIF-67) nanotubes are obtained from the reaction between electrospun polyacrylonitrile/cobalt acetate and 2-methylimidazole, followed by the dissolution of template. Next, a combined calcination and sulfidation process is employed to convert the ZIF-67 nanotubes to CoSx@HNCNTs. Benefited from the compositional and structural features, the as-prepared nanostructured hybrid materials deliver superior lithium storage properties with high capacity of 1200mAhg−1 at 0.25Ag−1. More importantly, a remarkable capacity of 1086mAhg−1 can be maintained after 100 cycles at the current density of 0.5Ag−1. Even at a high rate of 5Ag−1, a reversible capacity of 592mAhg−1 after 1600 cycles can still be achieved.