Cold oxygen ions escaping from the ionosphere and temporarily trapped near the plasmapause form the oxygen torus. Mass-loading by these oxygen ions significantly affects magnetospheric plasma processes. However, due to the technical challenges in measuring cold oxygen ions and the limited spatial and temporal coverage of space missions within the magnetosphere-ionosphere coupling system, the generation mechanism of oxygen torus remains unclear. Here, we propose a novel approach to determine the ion abundances from the observable polarization and propagation characteristics of electromagnetic ion cyclotron (EMIC) waves and identify a narrow oxygen torus near the noonside plasmapause during a geomagnetically quiet period. Our data and theoretical calculations suggest that the formation of this oxygen torus involved excitation of EMIC waves by ring current protons, wave-driven Landau heating of plasmaspheric electrons, heat conduction from the magnetosphere to the ionosphere, and upward thermal diffusion of ionospheric oxygen ions into the magnetosphere.