An easily applied and sensitive sensor for the detection of heavy metal ion residues based entirely on magnetic nanoparticle and oligonucleotide was developed. The tool is established on the relaxation of magnetic nanoparticles with different dispersion states. The target analyte, Hg ions, induce the aggregation of the MNP oligonucleotide probes. Accordingly, the light produced by the magnetic relaxation image and the transverse relaxation time (T(2)) all change due to the effect of the aggregation. The limit of qualitative detection of the sensor is 0.15 ppt. The recoveries from test samples range between 97.1-101.8%. Using the nuclear resonance instrument, the method is a high throughput and sensitive sensor.