A highly sensitive and selective colorimetric assay for the detection of Hg2+ ions was developed using gold nanoparticles (AuNPs) conjugated with polyethyleneimine (PEI). The Hg2+ ion coordinates with PEI, decreasing the interparticle distance and inducing aggregation. Time-of-flight secondary ion mass spectrometry showed that the Hg2+ ion was bound to the nitrogen atoms of the PEI in a bidentate manner (N–Hg2+–N), which resulted in a significant color change from light red to violet due to aggregation. Using this PEI-AuNP probe, determination of Hg2+ ion can be achieved by the naked eye and spectrophotometric methods. Pronounced color change of the PEI-AuNPs in the presence of Hg2+ was optimized at pH 7.0, 50°C, and 300 mM·NaCl concentration. The absorption intensity ratio (A700/A514) was correlated with the Hg2+ concentration in the linear range of 0.003–5.0 μM. The limits of detection were measured to be 1.72, 1.80, 2.00, and 1.95 nM for tap water, pond water, tuna fish, and bovine serum, respectively. Owing to its facile and sensitive nature, this assay method for Hg2+ ions can be applied to the analysis of water and biological samples.