The work focus to enhance the properties of xanthan gum (XG) by anchoring metal ions (Fe, Zr) and encapsulating inorganic matrix (M@ XG-ZA). The fabricated nanocomposite was characterized by Transmission Electron Microscopy (TEM), Scanning Electron Microscopy (SEM), Energy-dispersive X-ray spectroscopy (EDX), Fourier Transform Infrared Spectroscopy (FTIR), surface area (BET) and zeta potential analysis. The adsorption of Sc, Nd, Tm and Yb was investigated after screening of synthesized materials in detail to understand the influence of pH, contact time, temperature and initial REE (rare earth element) concentration both in single and multicomponent system via batch adsorption. The adsorption mechanism was verified by FTIR, SEM and elemental mapping. The SEM images of Zr@ XG-ZA demonstrate scutes structure, which disappeared after adsorption of REEs. The maximum adsorption capacities were 132.30, 14.01, 18.15 and 25.73 mg/g for Sc, Nd, Tm and Yb, respectively. The adsorption efficiency over Zr@ XG-ZA in multicomponent system was higher than single system and the REEs followed the order: Sc > Yb > Tm > Nd. The Zr@ XG-ZA demonstrate good adsorption behavior for REEs up to five cycles and then it can be used as photocatalyst for the degradation of tetracycline. Thus, the work adds a new insight to design and preparation of efficient bifunctional adsorbents from sustainable materials for water purification.