Volume swelling is a typical mode of battery failures, which happens not only in the operation but also during the storage of rechargeable batteries as a result of electrolyte degradation, particularly the chemical oxidation of electrolyte solvents by the active oxygen released in phase transition of the layered cathode materials. Aiming to remove the active oxygen, we herein propose Pyrite FeS2 powder as an in-situ oxygen remover based on the fact that FeS2 can be ultimately oxidized to Fe2O3 and Li2SO4 by the active oxygen, and the redox reaction depletes considerable amount of oxygen. By mixing FeS2 powder into a conventional LiNi0.80Mn0.10Co0.10O2 (NMC811) cathode, it is found that under normal cycling conditions of the Li/NMC811 cells, FeS2 is electrochemically stable while being capable of reacting with active oxygen and hence stabilizing the cell's capacity retention. The concept proposed in this work provides a practically viable and cost-effective approach for preventing volume swelling of the rechargeable batteries based on the layered cathode materials.