Next generation rechargeable battery materials will need to exhibit improved energy storage capacities and cycle lifetimes to enable the electrification of transportation and the use of renewable power sources. While many materials exhibit larger energy storage capacities than commercialized Li-ion batteries, they still suffer from short lifetimes due to material instabilities. Here we demonstrate a strategy to improve the cycle lifetimes of Sb alloy anodes in Li-ion and Na-ion batteries by electrodepositing the anodes as Sb/carbon-nanotube composite films.