We synthesized a tetra-functional fluorescence probe based on dansyl and peptide motif, dansyl-Gly-Trp (DGT, 1), that efficiently bound several metal ions and showed distinguishing optical properties. The probe 1 could respond to Hg2+ with enhanced and blue-shifted fluorescence emission but to Cu2+ with obvious fluorescence quenching. In addition, 1 was sensitive to pH ranging from 2.0 to 5.0 and precipitated in the presence of Pb2+ at neutral conditions. The combination of these intrinsic properties with the selective responses to different chemical inputs allows this system to be implemented as an ionic switch. Furthermore, 1 could penetrate the cell membrane and accumulated well in intracellular region. The underlying mechanisms of the probe to different kind of metal ion were explored successfully by using either 1H NMR, NOESY, electron paramagnetic resonance (EPR) or FT-IR spectra. In addition, to investigate the binding model of 1/Hg2+ and 1/Cu2+, simulations were also performed by using density functional theory (DFT) and reasonable binding configurations were achieved for these two complexes.