An SnO2-carbon nanocomposite was created by a self-assembly method. This showed promising electrochemical performance as both a Na and Li ion battery anode, with among the best cyclability and rate capability when tested against Na.