Fluorescent chitosan-based hydrogel for the selective detection and adsorption of Hg2+/Hg+ in aqueous environment was prepared through three-step synthesis strategy. NO2-Boron-dipyrrolemethene (BODIPY) was prepared firstly, and then the -NO2 group was reduced to -NH2 group. Finally, the NH2-BODIPY was introduced to chitosan by Schiff base formation reaction through bi-aldehyde. Eventually, fluorescent chitosan hydrogel was obtained. The as-prepared fluorescent hydrogel probe could detect Hg2+/Hg+ through PET mechanism with the detection limit of 0.3 μM. The recognition site which combines Hg2+/Hg+ is CN, it is just formed in the reaction with chitosan and the amino group on BODIPY. Adsorption capacity of the fluorescent hydrogel is 121 mg·g-1, which is almost seven times of the original chitosan. The isotherm and kinetics of Hg2+/Hg+ removal follows Langmuir isotherm and pseudo-second order kinetics, respectively. Besides, a series of fluorescent hydrogels were prepared to compare the elasticity, hydropHilicity, fluorescence intensity and adsorption capacity.