Lithium-ion batteries (LIBs) are widely used in applications ranging from electric vehicles to wearable devices. Before the invention of secondary LIBs, the primary lithium-thionyl chloride (Li-SOCl2) battery was developed in the 1970s using SOCl2 as the catholyte, lithium metal as the anode and amorphous carbon as the cathode1–7. This battery discharges by lithium oxidation and catholyte reduction to sulfur, sulfur dioxide and lithium chloride, is well known for its high energy density and is widely used in real-world applications; however, it has not been made rechargeable since its invention8–13. Here we show that with a highly microporous carbon positive electrode, a starting electrolyte composed of aluminium chloride in SOCl2 with fluoride-based additives, and either sodium or lithium as the negative electrode, we can produce a rechargeable Na/Cl2 or Li/Cl2 battery operating via redox between mainly Cl2/Cl− in the micropores of carbon and Na/Na+ or Li/Li+ redox on the sodium or lithium metal. The reversible Cl2/NaCl or Cl2/LiCl redox in the microporous carbon affords rechargeability at the positive electrode side and the thin alkali-fluoride-doped alkali-chloride solid electrolyte interface stabilizes the negative electrode, both are critical to secondary alkali-metal/Cl2 batteries.