International maritime shipping—powered by heavy fuel oil—contributes 2.5%, 12%, and 13% of global anthropogenic CO2, SO2, and NOx emissions, respectively. The direct electrification of vessels has been underexplored as a low-emission option despite its considerable efficiency advantage over electrofuels such as green hydrogen and ammonia. Previous studies of ship electrification have relied on outdated battery cost and energy density values and have incorrectly assumed mechanical space to be a fixed technical variable. We show that with near-future battery prices of $100 kWh-1 the electrification of intraregional trade routes of less than 1,000 km is economically feasible with minimal impact to ship carrying capacity. Projected declines in battery price to $50 kWh-1 could improve this range to 5,000 km. We describe a pathway for the battery electrification of containerships within this decade that electrifies over 40% of global containership traffic, reduces CO2 emissions by 40% for US-based vessels, and mitigates the health impacts of air pollution on coastal communities.