Currently, the fluorescentprobe is an important method for detecting heavy metal ions, especially mercury ion (Hg2+), which is harmful to the health of humans and the environment due to its toxicity and extensive use. In this paper, we designed and synthesized a colorimetric and long‐wavelength fluorescentprobe Hg‐P with high sensitivity and excellent selectivity, which could detect Hg2+ by the changes