The invention discloses a detecting method for 
divalent mercury ions. The principle for detecting mercury ions by using the method is as follows: a single-chain 
DNA (
Deoxyribose Nucleic Acid) molecule B modified by 
fluorescein contains a sequence which is complementary with a sequence of 
a DNA catching needle (a single-chain 
DNA molecule A) fixed on the surface of a probe, and also contains a T-T 
base pair mismatch structure which can be combined with the 
divalent mercury ions. During detection, the single-chain 
DNA molecule B modified by the 
fluorescein and the mercury ions are simultaneously input to the surface of an 
optical fiber sensor probe for evanescent 
waves, and the 
divalent mercury ions are combined with the single-chain DNA molecule B modified by the 
fluorescein by the DNA catching needle in a competition way. The more the concentration of the divalent mercury ions is, the fewer the single-chain DNA molecule B modified by the fluorescein and combined with the DNA catching needle on the 
optical fiber sensor probe for evanescent 
waves is, so that a 
fluorescence intensity 
signal detected by an optical detecting platform for evanescent 
waves is weaker. An effective means is provided for the rapid on-site and real-time detection of heavy 
metal mercury ions in the fields of foods, medicines and environments.