Carbon dioxide (CO2) as a greenhouse gas causes globe warming. Recent studies have shown that CO2 can be harnessed to make an energy storage device through the operation of metal-CO2 batteries. While the Li-CO2 and Na-CO2 batteries showing high capacity and good cycle life have been demonstrated, the possibility of creating a K-CO2 battery has not been realized. Here we report the creation of a K-CO2 battery by using CO2 as the cathode in an advanced aberration corrected environmental transmission electron microscope, and in-situ observation of the discharge and charge processes of the nanobattery. During discharge, K2CO3 was generated in the cathode, which converted back to metal K during charge, and the K-CO2 nanobattery demonstrates a good cyclability. Moreover, it is evident that CO gas was released during discharge and the carbon cathode was consumed continuously during charge. Our study provides a fundamental understanding of the K-CO2 battery, which may aid the designing of K-CO2 based energy storage devices.