In this work, Co3O4 nanoparticles were loaded on the nitrogen-doped porous carbon spheres (NPCS) by a facile hydrothermal method. The NPCS were derived from carboxymethyl chitosan as the carbon and nitrogen source. The as-prepared Co3O4/NPCS nanocomposites were used as anode materials for lithium-ion batteries. The electrochemical results showed that the materials possessed a high initial discharge capacity of 1245.5mAhg−1 and still maintained a high reversible capacity of 983.9mAhg−1 after 100 cycles at a current density of 100mAg−1. Even at a high current density of 5Ag−1, it delivered a very stable reversible capacity of 659mAhg−1. The high electrochemical performance of the Co3O4/NPCS nanocomposites can be attributed to the synergistic effects of the nanoscale Co3O4 particles, the porous structure of the NPCS and the N functional groups on the NPCS.