Nanoporous carbons were prepared via chemical and physical activation from mangosteen-peel-derived chars. The removal of atrazine was studied due to the bifunctionality of the N groups. Pseudo-first-order, pseudo-second-order, and intraparticle pore diffusion kinetic models were analyzed. Adsorption isotherms were also analyzed according to the Langmuir and Freundlich models. The obtained results were compared against two commercially activated carbons with comparable surface chemistry and porosimetry. The highest uptake was found for carbons with higher content of basic surface groups. The role of the oxygen-containing groups in the removal of atrazine was estimated experimentally using the surface density. The results were compared with the adsorption energy of atrazine theoretically estimated on pristine and functionalized graphene with different oxygen groups using periodic DFT methods. The energy of adsorption followed the same trend observed experimentally, namely the more basic the pH, the more favored the adsorption of atrazine. Micropores played an important role in the uptake of atrazine at low concentrations, but the presence of mesoporous was also required to inhibit the pore mass diffusion limitations. The present work contributes to the understanding of the interactions between triazine-based pollutants and the surface functional groups on nanoporous carbons in the liquid–solid interface.