A selective and sensitive fluorescent sensor for detection of Hg2+ in natural water was achieved by incorporating the well-known fluorophore quinoline group and a water-soluble D-glucosamine group within one molecule.