Nanoflower-like N–C/CoS2 composites are synthesized by a facile one-pot solvothermal technique, exhibiting excellent sodium ion storage performance.