In this paper, we report new rhodamine hydrazone derivatives bearing thiol and carboxylic acid groups as selective fluorescent and colorimetric chemosensors for Hg2+. The ring-opening process of spirolactam enables the large fluorescent enhancement and colorimetric change upon the addition of Hg2+. The sample containing Hg2+ was mixed with one of the chemosensors in a microchannel where the sensor was examined using confocal laser scanning microscopy. A plot of the fluorescent intensities of both chemosensors versus the log concentration of Hg2+ exhibited a linear response (r2 = 0.95) in the range of 1 nM-1 μM, and the detection limits were 1 nM and 4.2 nM, respectively. Both chemosensors also enable the visualization of Hg2+ accumulated in the nematode Caenorhabditis elegans previously exposed to nanomolar concentrations of Hg 2+.