The ability of osthol (OST) to recognize mercury ions in aqueous solution was studied using fluorescence, UV–vis spectrophotometry, mass spectrometry, and 1H NMR spectroscopy, and the recognition mechanism is discussed. The results showed that OST and Hg2+ can form a complex with a stoichiometric ratio of 1:1. The binding constant was 1.552 × 105 L∙mol−1, having a highly efficient and specific selectivity for Hg2+. The fluorescence intensity of OST showed a good linear correlation with the Hg2+ concentration (6.0 × 10−5 to 24.0 × 10−5 mol∙L−1, R2 = 0.9954), and the detection limit of the probe was 5.04 × 10−8 mol∙L−1, which can be used for the determination of Hg2+ traces.