In this study, the imprinted aniline–formaldehyde was used as an adsorbent for removal of Iridium and Palladium ions from aqueous solutions through batch equilibrium. The sorbent was characterized by fourier transform infrared spectroscopy. The influence of pH, equilibrium time, temperature and initial concentration of metal ions on adsorbed amount of both ions were investigated. The maximum adsorption capacity in initial concentration of 100 mg/L was found to be 12.5 mg/g at pH 7.0 and 14.3 mg/g at pH 8.0 for Iridium and Palladium, respectively. In addition, the best desorption of the metal ions from resin was obtained by 0.5 mol/L nitric acid as eluting agent. The profile of both ions uptake on this sorbent reflects good accessibility of the chelating sites in the imprinted aniline–formaldehyde. Langmuir, Freundlich, Temkin and Redlich–Peterson isotherm models were applied to analyze the experimental data. Moreover, Langmuir linear method was used to obtain the isotherm parameters. However, Langmuir type II achieved the highest coefficient which led to the best fit for the palladium and the best fit for Iridium obtained from linear Redlich–Peterson. However, the thermodynamic parameters (ΔG°, ΔH°, and ΔS°) were also determined using the equilibrium constant values obtained at different temperatures. The results showed that the adsorption for Iridium and Palladium ions was spontaneous nature and endothermic. Moreover, the method was applied for the determination of both ions from tap water samples.