A simple and low cost method was developed and validated for the determination of trace mercury (II) ions in dental-unit wastewater and fertilizer samples. The method was based upon the reaction of mercury (II) ions with the novel reagent 6-{4-(2,4-dihydroxyphenyl)diazenyl)phenyl}-2-oxo-4-phenyl-1,2-dihydropyridine-3-carbonitrile (DDPODC), the formed complex shows an absorption maximum at 444 nm (λmax) in borate buffer of pH 9.0 and SDS. Beer’s–Lambert law and Ringbom’s plots of the colored Hg–reagent complex were obeyed in the concentration range of 0.1–5.0 and 0.4–4.70 µg mL−1 mercury (II) ions, respectively with a relative standard deviation in the range of 1.8 ± 0.7%. The limits of detection (LOD) and quantification (LOQ) of the procedure were 0.3 and 0.98 µg mL−1 Hg2+, respectively. The proposed method was applied for the analysis of mercury (II) in dental-unit wastewater and fertilizer samples. The validation of the method was tested by comparison with the data obtained by the inductively coupled plasma-mass spectrometry (ICP-MS). The statistical treatment of data in terms of Student’s t-tests and variance ratio F-tests has revealed no significance differences.