The objective of this study was to assess the capacity of Anionic Polyacrylamide (APAM) to remove heavy metal ions, such as cadmium and lead, from aqueous solutions through adsorption. A customized design based on response surface methodology (RSM) was used to build predictive models and optimize heavy metal reduction. Twenty experiments were conducted to evaluate the impact of variables on the adsorption removal process of both heavy metals, including the initial concentration (IC) (A), adsorbent dose (B), and pH (C), as well as their interactions. The results indicate that increasing the pH and adsorbent dose leads to a higher removal rate for both metals, whereas increasing the initial concentration of the metals results in a lower removal rate. The interaction between variables was found to be insignificant. The statistical analysis demonstrates that both heavy metal models are highly significant with very low probability values (p < 0.0001) and excellent predictability, with R² values exceeding 0.91 for the two metals. The optimal values for initial concentration, adsorbent dose, and pH for cadmium and lead were determined to be 10.29-10 ppm, 0.063 –0.026 g, and 4.49-5, respectively. Under these optimal conditions, the removal efficiency for cadmium and lead was found to be between 99% and 99.33%, respectively. The Langmuir model described best the equilibrium adsorption behavior, indicating a monolayer adsorption with maximum adsorption capacities of 418.04 mg/g for Pb2+ and 236.48 mg/g for Cd2+, while the pseudo-second-order model provided the best fit for analyzing the kinetics of adsorption. These findings highlight APAM as a highly effective and promising adsorbent for heavy metals remediation, which offer a viable solution for water treatment.