A simple fluorescent chemosensor 1 for the detection of Hg2+ and pH was developed by a combination of 2-aminoethyl piperazine and 4-chloro-7-nitrobenz-2-oxa-1,3-diazole. The sensor 1 showed OFF-ON behavior for different colors of fluorescence in the presence of Hg2+ and under acidic conditions, respectively, in a near-perfect aqueous solution. The turn-on fluorescence caused by inhibition of photoinduced electron transfer was explained by theoretical calculations. 1 could be used to quantify Hg2+ in water samples, and its in vitro studies with HeLa cells showed fluorescence in the presence of Hg2+. In addition, 1 could selectively detect S2- by changing its color from orange to pink in a near-perfect aqueous solution. Moreover, 1 could be used as a practical, visible test kit for S2-.