In this study, we report a histidine-based fluorescence probe for Cu(2+) and Hg(2+), in which the amino group and imino group were modified by two common protective groups, 9-fluorenylmethoxycarbonyl and trityl group, respectively. In a water/methanol mixed solution, the probe displayed a selective fluorescence "turn-off" response to Cu(2+) when the ratio of CH(3)OH/H(2)O was higher than 1:1. Specifically, when the solvent is changed to 1:1 methanol/water, the 304 nm fluorescence peak is enhanced, while the 317 nm peak is weakened, upon addition of either Cu(2+) or Hg(2+) ions. The mechanism for such distinct responses of the probe to Cu(2+) and Hg(2+) was further clarified by using NMR and molecular simulation. The experiment results indicated that the polarity of solvent could influence the coordination mode of 1 with Cu(2+) and Hg(2+), and control the fluorescence response as a "turn-off" or ratiometric probe.