A facile, one-pot and green method has been developed for the synthesis of silver nanoparticles (AgNPs) using the sodium salt of N-cholyl-l-cysteine (NaCysC) as capping and reducing agent under ambient sunlight irradiation. The synthesized nanoparticles were used for highly selective and sensitive colorimetric detection of Hg2+ in aqueous medium with a limit of detection of about 8 nM. © 2015 The Royal Society of Chemistry.