Although a variety of chemosensors as probes have been exploited for the detection of metal ions with high sensitivity and selectivity, the formed probe-metal complex was hardly suitable for separation, removal, and further recovery. This paper presents a method to detect and remove metal ions from aqueous solutions simultaneously by a fluorescence chemosensor and functional magnetic nanoparticles. A novel probe SRhB-Azo was synthesized based on rhodamine B (RhB), maleic anhydride (MAH), and azobenzene (Azo). SRhB-Azo showed high selectivity and sensitivity to Hg ions in aqueous solutions. Job's experiment showed the formation of a 1:2 stoichiometry complex between Hg 2+ and SRhB-Azo. Moreover, β-cyclodextrin (β-CD)-modified magnetic nanoparticles (CD-MNPs) were fabricated and used as host materials to form the inclusion complex CD-MNP and SRhB-Azo-Hg 2+ . Then, the SRhB-Azo-Hg 2+ complex could be removed by an external magnet, and subsequently recovered by UV-irradiation-induced trans/cis isomerization of the Azo groups. The CD-MNPs could be reused for nearly four times. Thus, the SRhB-Azo probe and CD-MNP system has great potential application in sewage treatment.