A low-cost activated carbon based on agroforestry residues (AAC) was synthesized and characterized to remove aniline (AN), a healthy and environmentally toxic substance. The batch adsorption assays were used to assess the effect of contact time (1, 2, 6, 12, and 24 h), pH (2, 4, 6, and 8), and with 1, 5, and 10 mg/L AN concentration. The adsorption mechanism of AN on ACC and commercial carbons (GAP and PAC) was evaluated and compared through Langmuir, Freundlich, and Temkin isotherms. The results show that AN removal increases with decreasing pH, reaching a maximum removal capacity of AAC of 90 %. AAC resulted in similar efficiency to GAC > 90 % to 1 and 5 mg/L. Langmuir shows the best-fit model reaching an R2 of 0.98. These models explain that the adsorption mechanism of AN on ACC is homogeneous, and monolayer adsorption occurs, achieving a maximum capacity of 1.20 and 1.16 mg/g for ACC and PAC, respectively, with a possible endothermic mechanism suggested by Temkin. The results showed that AAC could be considered an effective and economical adsorbent in removing the AN.