A fluorescent "turn-on" probe for the dual-channel detection of Hg(II) and Mg(II) and its application of imaging in living cells.