The lithium (Li)–air battery has an ultrahigh theoretical specific energy, however, even in pure oxygen (O2), the vulnerability of conventional organic electrolytes and carbon cathodes towards reaction intermediates, especially O2−, and corrosive oxidation and crack/pulverization of Li metal anode lead to poor cycling stability of the Li-air battery. Even worse, the water and/or CO2 in air bring parasitic reactions and safety issues. Therefore, applying such systems in open-air environment is challenging. Herein, contrary to previous assertions, we have found that CO2 can improve the stability of both anode and electrolyte, and a high-performance rechargeable Li–O2/CO2 battery is developed. The CO2 not only facilitates the in situ formation of a passivated protective Li2CO3 film on the Li anode, but also restrains side reactions involving electrolyte and cathode by capturing O2−. Moreover, the Pd/CNT catalyst in the cathode can extend the battery lifespan by effectively tuning the product morphology and catalyzing the decomposition of Li2CO3. The Li–O2/CO2 battery achieves a full discharge capacity of 6628 mAh g−1 and a long life of 715 cycles, which is even better than those of pure Li–O2 batteries.