We provide a highly sensitive and selective assay to detect Hg(2+) in aqueous solutions using gold nanoparticles modified with quaternary ammonium group-terminated thiols at room temperature. The mechanism is the abstraction of thiols by Hg(2+) that led to the aggregation of nanoparticles. With the assistance of solar light irradiation, the detection limit can be as low as 30 nM, which satisfies the guideline concentration of Hg(2+) in drinking water set by the WHO. In addition, the dynamic range of detection is wide (3 × 10(-8)-1 × 10(-2) M). This range, to our best knowledge, is the widest one that has been reported so far in gold nanoparticle (AuNP)-based assays for Hg(2+).