A flowerlike C/SnS@C nanocomposite assembled from SnS@C nanoflakes vertically anchored on carbon nanoparticles is constructed by one facile hydrothermal method combined with an annealing process. Electrochemical results indicates that the sample displays remarkable lithium/sodium storage properties owing to the synergetic effect of the existence of carbon matrix and the void space between the SnS nanoflakes, which improve the electro-conductivity and alleviate volume fluctuations during the cycling process. Furthermore, S, N co-doped carbon shells can provide more active sites, which can improve Li+/Na+ adsorption. As anode materials for lithium/sodium ion batteries (LIBs/SIBs), the sample demonstrates splendid capacities of 740 mA h g−1 at 1 A g−1 after 1000 cycles in LIBs and 485 mA h g−1 at 500 mA g−1 after 400 cycles in SIBs, respectively.