Ion-adsorption type rare earths ore (IREO) is an important strategic resource that can be leached in-situ using electrolytes such as NH4+, Mg2+, and Al3+. However, the use of NH4+ was restricted due to ammonia-nitrogen pollution, regarding in-situ leaching agents still remain controversial. It is imperative to comprehensively and systematically investigate the desorption mechanism of rare earth elements (REEs) from a microscopic perspective, especially when using Mg2+ and Al3+ as leaching agents. In this manuscript, the desorption behavior and mechanism of Y3+ from ADY (IREO as adsorbents loaded with Y3+) were studied, along with a comparison of the Y3+ desorption capabilities of Mg2+ and Al3+ as leaching agents. The results showed that Y3+ could be effectively desorbed from IREO by both Mg2+ and Al3+, with Y3+ desorption yields of 93.1 % (pH 3.2, 0.06 mol/L) for Al3+ and 88.6 % (pH 6.0, 0.3 mol/L) for Mg2+, respectively. The superior Y3+ desorption capability of Al3+ arises from its higher valence, greater electronegativity, and smaller ionic radius compared to Mg2+. The higher valence imparts Al3+ greater charge density, while the greater electronegativity enables Al3+ to more readily substitute for Y3+. Additionally, the smaller ionic radius facilitates the entry of Al3+ into clay minerals interlayers. At high H+ concentrations, the Y3+ desorption capabilities of Mg2+ and Al3+ were both higher than at the original pH without acid addition, primarily due to the influence of H+, which could leach Y3+ from the un-exchangeable phase, but also significantly increased the leaching of impurities. The isotherms and kinetics demonstrated the desorption of Y3+ in the case of Mg2+ and Al3+ existing followed the Langmuir and pseudo-second-order models, indicating homogeneous, chemisorption-governed processes. Furthermore, ATR-FTIR, XPS, and DFT results revealed Y3+ desorption occurred by breaking SiOY bonds and ion exchange with Mg2+/Al3+ to form SiOMg/Al bonds.