Making the transition from fossil fuels to cleaner, renewable energy sources for the world’s automobile fleet will require dramatic improvements in rechargeable batteries: They will need to be lighter, less expensive, run 300-plus miles on a single charge and last the lifetime of the vehicle. While lithium-ion batteries promise to fulfill all these requirements, progress has been frustratingly slow and incremental. To speed things up, researchers are using powerful synchrotron-based X-rays to peer inside lithium-ion batteries while they operate. These studies of batteries in action are revealing the detailed physical and chemical changes that take place as a battery charges and discharges. Understanding how batteries function – and what causes them to eventually fail – will help scientists design the next generation of battery technologies.