A circular economy for batteries is crucial for building a sustainable battery value chain, as end-of-life electric vehicle batteries can be given a second life or valuable raw materials can be harvested to make new batteries. However, significant challenges remain in forecasting availability, predicting remaining value, minimizing reverse logistics costs, and maximizing value recovery from end-of-life batteries. Here we devise an ecosystem value optimization approach powered by a digital solution framework, consisting of innovative analytical models and a trusted data platform, to optimize five key value drivers for battery circularity—safety, regulatory compliance, carbon footprint reduction, quality, and financials. The envisioned solution can help reduce average transportation costs of end-of-life batteries by 11% to 44% compared to current shipping practices, estimate battery health with error rates less than 1%, and improve value recovery by 52% to 60% by routing batteries with good health to second-life application providers.