The invention provides a fluorescent probe for detecting mercury ions and a preparation method and application of the fluorescent probe. The chemical name of the fluorescent probe is 3-(4-(1,3,5,7-tetramethyl-8 propyl)boron fluoride dipyrrol-4-carbonyl)piperazine)-rhodamine B hydrazide. The fluorescent probe takes a boron fluoride dipyrrol fluorescent dye BODIPY unit as an energy donor, a rhodamine unit serves as an energy receptor, by means of bivalent mercury ions, 'on-off' of a spiramide ring is promoted, the purpose that the BODIPY unit and the rhodamine unit are subjected to fluorescenceresonance energy transfer to cause fluorescent red shift is achieved, and then a fluorescence ratio type probe can be used for detecting Hg<2+>; the fluorescent probe takes n-(3-hydroxyphenyl)piperazine and 2-(4-diethylamino)-2-hydroxyl)-benzoic acid as the raw materials, after a reaction is conducted, the raw materials and (1,3,5,7-tetramethyl-8-propoxycarbonyl succinimide)boron fluoride dipyrrolare subjected to a condensation reaction, and the fluorescent probe is obtained. The probe is an FRET-based ratio type fluorescent probe which is high in sensitivity, good in selectivity and capableof detecting the mercury ions in an aqueous phase.