SnO2 nanotube arrays embedded in a carbon layer were fabricated via a simple sol–gel method, which has shown good battery performance.