Heavy metal pollution can exert severe effects on the environment and human health. Simple, selective, and sensitive detection of heavy metal ions, especially two or more, using a single probe, is thereby of great importance. In this study, we report a new and facile strategy for discriminative detection of Hg(2+) and Cd(2+) with high selectivity and sensitivity via pH-modulated surface chemistry of the glutathione-capped gold NCs (GSH-Au NCs). By simply adjusting pH values of the colloidal solution of the NCs, Hg(2+) could specifically turn off the fluorescence under acidic pH, however, Cd(2+) could exclusively turn on the fluorescence under alkaline pH. This enables the NCs to serve as a dual fluorescent sensor for Hg(2+) and Cd(2+). We demonstrate that these two opposing sensing modes are presumably due to different interaction mechanisms: Hg(2+) induces aggregation by dissociating GSH from the Au surface via robust coordination and, Cd(2+) could passivate the Au surface by forming a Cd-GSH complex with a compact structure. Finally, the present strategy is successfully exploited to separately determine Hg(2+) and Cd(2+) in environmental water samples.