Carbon–SnO2 core–shell hybrid nanofibers were prepared via single-spinneret electrospinning and subsequent heat treatment. The Kirkendall effect during the heat treatment is found to be responsible for the formation of core–shell morphology. The route is proven to be generic for fabrication of carbon–metal oxide or carbon–metal core–shell nanofibers, and corresponding nanotubes.