This research focuses on generating magnetic adsorbents with less expensive precursors, a simple and cheap method of subcritical drying for xerogel, and easily recovered from the aqueous medium with magnetic properties for reducing impact of pollutants in the environment. The application of the response surface methodology (RSM) in optimization of As(III) and As(V) adsorption process on carbon xerogel nanocomposites (XMCs) from aqueous solution was proposed in this study under the scheme of a central composite design 23 with a central face. XMCs were synthesized from sol-gel polymerization of a resorcinol-formaldehyde composited with magnetite nanoparticles (MNPs) and carbonized at 600°C for 6 h. MNPs were incorporated into the structure of gels corresponding to the XRD, FTIR and SEM/EDX analysis. The varying stoichiometric of resorcinol/water ratios had a significant effect on the resulting texture and surface chemistry properties. The model obtained by RSM was able to acquire the optimal values of the variables (solution pH, dose, and initial concentration) to maximize the removal of As(V) and As(III) of 95±5.98% and 65±10.32%, respectively. The kinetic and equilibrium studies were well described by the pseudo second order and Freundlich isotherm, respectively. Thermodynamic analysis was endothermic and spontaneous in nature. The removal efficiency in groundwater found arsenic at levels lower than the WHO standards.