A small molecular fluorescent sensor synthesized through Schiff base reaction can be used to detect Hg2 with an exclusive selectivity, high fluorescent enhancement and reversibility.