A new chelating resin, poly(diacetonitrile methacrylamide-co-divinylbenzene-co-vinylimidazole), was synthesized and characterized by infrared spectroscopy, scanning electron microscopy, thermogravimetric analysis, and elemental analysis. The novel resin was used for the first time as a chelating adsorbent for the preconcentration of Cd, Co, Cr, Cu, Mn, Ni, Pb, and Zn from various samples by flame atomic absorption spectrometry. The adsorption capacities of the resin were 29.3, 31.6, 29.3, 27.3, 35.5, 31.7, 39.8, and 32.3mgg(-1) for Cd, Co, Cr, Cu, Mn, Ni, Pb, and Zn, respectively. The detection limits of the metal ions were from 0.42 to 3.21 mu gL(-1). A preconcentration factor of 30 for all metal ions was obtained. The precision of the method as the relative standard deviation was less than or equal to 2.6%. The described method was validated with certified reference materials and fortified real samples. The method was used for the determination of the analytes in well water and wastewater.