Low-cost sodium-ion batteries (SIBs) have shown very promise in the applications of renewable energy and low-speed electric vehicles. The development of a new O2-type cathode in SIBs is very challenging in that this compound is only stable as an intermediate product of P2-type oxides during redox reactions. Here, we report a thermodynamically stable O2-type cathode obtained by Na/Li ion exchange from P2-type oxide in a binary molten salt system. It is demonstrated that the as-prepared O2-type cathode exhibits a highly reversible O2–P2 phase transition during Na+ de-intercalation. The unusual O2–P2 transition has a low volume change of ∼11%, much lower than that of 23.2% for P2–O2 transformation in the P2-type cathode. The lowered lattice volume change of this O2-type cathode gives rise to superior structural stability upon cycling. Therefore, the O2-type cathode possesses a reversible capacity of about 100 mAh/g with a good capacity retention of 87.3% even after 300 cycles at 1C, indicating outstanding long-term cycling stability. These achievements will promote the development new class of cathode materials with high capacity and structural stability for advanced SIBs.