Two new low-cost polymeric adsorbents have been obtained in a simple reaction of diethylenetriamine (DETA) or pentaethylenehexamine (PEHA) with 1,3,5-tris(6-isocyanatohexyl)-1,3,5-triazinane-2,4,6-trione (HDI-IC). The reagents used for the synthesis are inexpensive and are produced yearly in high quantities to be applied in various industrial processes. The resulting HDI-IC-DETA and HDI-IC-PEHA polymers possess ethyleneamine chains of various lengths therefore they are capable of forming polyamine chelating complexes with heavy metal ions. The composition, properties and morphology of the two polymers were investigated by Fourier transform infrared spectroscopy, elemental analysis, thermogravimetric analysis, solid state nuclear magnetic resonance, and scanning electron microscopy. The influence of parameters such as pH, initial concentration, contact time, and temperature on the adsorption of Cd2+, Co2+, Cr3+, Cu2+, and Ni2+ ions was investigated. The adsorption isotherm data were well fitted by Langmuir model, whereas the adsorption kinetics followed the pseudo-second-order kinetic model. The values of maximum amount of ions adsorbed, calculated using the Langmuir model for adsorption of Cd2+, Co2+, Cr3+, and Cu2+ ions on HDI-IC-PEHA polymer, were at least twice higher than those calculated for HDI-IC-DETA polymer. The findings reported indicate that HDI-IC-DETA and HDI-IC-PEHA polymers are excellent adsorbents for efficient removal of heavy metal ions from aqueous solutions.