A new fluorescence sensor is developed for simultaneous detection of Hg^2+ and Ag^+. During the detection process,Hg^2+ forms complexes with the fluorescent dye rhodamine B isothiocyanate(RBITC) modified onto the surface of gold nanoparticles(Au NPs),resulting in RBITC's displacement from the surface of Au NPs and the recovery of fluorescence. Meanwhile,Ag^+ forms "C-Ag^+-C" complex with C-rich 5-carboxyfluorescein(FAM)-ss DNA modified onto the surface of Au NPs,which keeps the fluorescent dye FAM close to the Au NPs and results in quench of fluorescence. The experimental results show a wide linear range and a good sensitivity. The limit of detection is 1.06 nmol/L for Ag^+ and 0.48 nmol/L for Hg^2+. This detection method is not only easy to operate but also efficient.