The reactions at the mineral-solution interface govern whether heavy metals (HMs) ions are retained within minerals or migrate with the solution, thus influencing their cycling and fate. However, the mechanisms driving this differential behavior of HMs at the interface remain poorly understood. In this study, we present a novel paradigm for the selective retention of HMs ions at the mineral-solution interface. By confining the solution on the mineral surface to a defined volume, specifically thinning it down to a thickness of 50 nm, selective retention of Cd ions in the presence of coexisting Cu and Zn ions was achieved. The distribution coefficient of Cd in the mineral reaches as high as 41.44, significantly exceeding that of Cu at 0.13 and Zn at 0.07. Combined with DFT calculations, the results reveal that this selectivity arises from the regulation of the ion desolvation free energy by the solution nanofilm, precisely compensating the energy cost for Cd incorporation as an impurity into the mineral lattice. This work not only enriches the understanding of ion separation behavior at natural mineral-solution interfaces but also offers a new strategy for heavy metal separation and enrichment in industrial applications.