The invention discloses a mercury ion detection probe based on an intramolecular hydrogen bond structural unit, a preparation method and an application thereof. The structure of the fluorescent probe is shown in formula I, which uses 5-formyl salicylaldehyde as a raw material, first forms a benzothiazole derivative with o-aminothiophenol, and then condenses with barbituric acid. The probe of the invention has stable optical properties, high detection sensitivity to mercury ions, low detection limit and a response range of 2-20.0 μM. Good selectivity, no silver ions, barium ions, calcium ions, lithium ions, sodium ions, potassium ions, magnesium ions, aluminum ions, nickel ions, zinc ions, mercury ions, cobalt ions, lead ions, palladium ions, strontium ions response. The fluorescent molecular probe of the invention has practical application value in fields such as the detection of mercury ions in biochemistry and environmental chemistry. (I).