Mercury ions are one of the most toxic heavy metals and as such they can cause serious risk to the human body and environment ecosystem.To effectively detect and remove Hg 2+ from contaminated water, a new cellulose-based fluorescent hydrogel has been fabricated using a ratiometric probe with carbon dots as energy donor and rhodamine moiety as energy acceptor (CDs-Rho).The probe exhibits a sensitive and linear response to Hg 2+ over a wide range from 0-100 μM with a limit detection of 2.19 × 10 -9 M and exhibits high selectivity for Hg 2+ over other cations.In addition, a series of cellulose-based fluorescent hydrogel slices containing CDs-Rho are continuously prepared using microtomy of a hydrogel, facilitating the large-scale fabrication of functionalized hydrogel slices with controlled thickness.The cellulose-based CDs-Rho (CCR) hydrogel exhibits good sensitivity and excellent adsorption capacity for Hg 2+ with ~95% removal efficiency, meeting the requirements for sewage discharge.Moreover, the purified water is successfully used for cell culture and animal growth, demonstrating excellent biocompatibility.Our approach is expected to offer a novel concept for the construction of biocompatible fluorescent hydrogels for the detection of various metal ions and removal through simply swapping the current probe with suitable replacements for a variety of relevant applications.