A new rhodamine-based reversible chemosensor (L-1) is reported, which could bind Hg2+ and Cu2+ in aqueous methanol solution with detectable change in color. Cu2+ and Hg2+ ions responded differently toward the fluorescence output signals on binding to L-1. L-1 could also be used as a selective probe for monitoring Hg2+ adsorbed on bacteria using an optical microscope.