In this paper, we report a synthetic route for cobalt sulfides nanoparticles embedded in porous carbon fibers (Co9S8@C) by carbonizing polydopamine (PDA)-coated metal coordination polymers (MCPs) and subsequent sulfidation process. This material serves as an anode for lithium-ion batteries, which exhibits high capacity and good rate capability. At a rate of 0.1C, a high reversible capacity of 1565mA h g−1 is being obtained. In addition, the battery maintains a stable reversible capacities of 606mA h g−1 for 300 cycles at 1C. The improvement of lithium-storage performance is mainly attributed to the smart design of carbon-wrapped mesoporous Co9S8 fibers, which not only prevents aggregation and volume change of the Co9S8 particles, but also enables good conductivity, and thus enhances electrochemical stability.