In this work, DNA-Hg(II) interactions were investigated by monitoring the translocation of DNA hairpins in a protein ion channel in the absence and presence of metal ions. Our experiments demonstrate that target-specific hairpin structures could be stabilized much more significantly by mercuric ions than by the stem length and the loop size of the hairpin due to the formation of Thymine-Hg(II)-Thymine complexes. In addition, the designed DNA probe allows the development of a highly sensitive nanopore sensor for Hg(2+) with a detection limit of 25 nM. Further, the sensor is specific, and other tested metal ions including Pb(2+), Cu(2+), Cd(2+), and so on with concentrations of up to 2 orders of magnitude greater than that of Hg(2+) would not interfere with the mercury detection.