The switch to electric vehicles over the next few decades should make a dent in transportation’s greenhouse gas emissions, but it will bring with it another environmental conundrum: what to do with all the end-of-life electric vehicle batteries when they pile up.

The problem isn’t a big one at the moment because electric car use remains relatively limited—though expanding rapidly—and because the lithium-ion batteries used in current electric cars should last through the mid-2020s. Tesla Inc. and Nissan Motor Co.,...