A chelating resin based on modified poly (styrene‐alt‐maleic anhydride) with 3‐aminobenzoic acid was synthesized. This modified resin was further reacted by 1,2‐diaminoethane or 1,3‐diaminopropane in the presence of ultrasonic irradiation to prepare tridimensional chelating resin for the removal of heavy metal ions from aqueous solutions. The adsorption behavior of Fe(II), Cu(II), Zn(II) and Pb(II) ions was investigated by synthesized chelating resins in various pH. Among the synthesized resins, CSMA‐AB1 and CSMA‐AB2 demonstrated a high affinity for the selected metal ions compared to SMA‐AB, and the order of removal percentage changes as follow: Fe(II) > Cu(II) > Zn(II) > Pb(II). The adsorption of all metal ions in acidic medium was moderate, and it was favored at the pH value of 6 and 7. Also, the prepared resins were examined for removal of metal ions from industrial wastewater and were shown to have a very efficient adsorption in the case of Cu(II), Fe(II) and Pb(II); however, the adsorption of Zn(II) was lower than others. The resin was characterized by Fourier transform infrared spectroscopy, scanning electron microscopy, X‐ray diffraction analysis and thermogravimetric analysis/derivative thermogravimetry. Copyright © 2012 John Wiley & Sons, Ltd.