Alkaline earth metal peroxides are typical examples of ionic compounds containing polyanions. We herein report a stable BaO2 phase at high pressure up to 130 GPa found via a first-principles computational structure search and high-pressure experimental investigations. The identified monoclinic structure (space group C2/m) can be derived by sublattice distortions of Ba atoms and peroxide groups associated with the phonon mode softening of the lower-pressure Cmmm structure. Contrary to the previous expectation of polymerization of the peroxide group at elevated pressure, this phase retains the peroxide group and, interestingly, exhibits an insulating behavior demonstrating an increase of the band gap under compression. Our synchrotron x-ray diffraction (XRD) measurements could not distinguish between Cmmm and C2/mBaO2 definitively because the difference in XRD patterns is very subtle. However, our data do not show any sign of polymerization transition up to 120 GPa. Raman spectra of the O-O peroxide vibration show a small anomaly in frequency at 110 GPa, which is qualitatively like that predicted theoretically due to the Cmmm to C2/m phase transition, thus supporting the predicted transformation.