Heavy metal ions, such as Hg(2+) and Ag(+), pose severe risks in human health and the environment. For sensitive detection and selective removal of Hg(2+) and Ag(+) ions, here, we demonstrate a surface-enhanced Raman scattering (SERS)-active platform by employing the oligonucleotide-functionalized magnetic silica sphere (MSS)@Au nanoparticles (NPs). This system exploits mismatched T-Hg-T and C-Ag-C bridges to capture Hg(2+) and Ag(+) ions, exhibiting excellent responses for Hg(2+) ions in the range of 0.1-1000 nM and for Ag(+) in the range of 10-1000 nM. The assay is highly selective for the target ions and does not respond to other metal ions. Additionally, the Hg(2+) and Ag(+) ions in this system can be effectively removed from surrounding solutions by an external magnetic field or through spontaneous precipitation. Moreover, more than 80% of the MSS@Au NPs can be easily recycled with the help of cysteine. We anticipate that the designed strategy could be extended to other analytes that can bind to DNA molecules with a high affinity, and can be used in many potential applications such as environmental renovation, toxin detection, and groundwater analysis.