Rare-earth elements (REEs) in industrial wastewaters have great value for recycling and reuse, but their characteristic of low concentration poses a challenge to an efficient enrichment from wastewaters. In recent years, thiometallates featuring twodimensional layers have shown great potential in the enrichment of REEs via the ion-exchange process. However, investigations on thiometallates featuring three-dimensional anionic frameworks for the recovery of REEs have not been reported. Herein, K 2 Sn 2 S 5 (KTS-2), a thiostannate possessing a three-dimensional porous framework, was chosen as an ion-exchange material for capturing REEs from an aqueous solution. Indeed, KTS-2 exhibited excellent ion-exchange performance for all 16 REEs (except Pm). Specifically, KTS-2 displayed a high capture capacity (232.7 ± 7.8 mg/g) and a short equilibrium time (within 10 min) for Yb 3+ ions. In addition, KTS-2 had a high distribution coefficient for Yb 3+ ions (K d > 10 5 mL/g) in the presence of excessive interfering ions. Impressively, KTS-2 could reach removal rates of above 95% for all 16 REEs in a large quantity of wastewater with low initial concentration (∼7 mg/L). Moreover, KTS-2 could be used as an eco-friendly material for ion exchange of REEs, since the released K + cations would not cause secondary pollution to the water solution.