The contamination of environmental matrices by chemical compounds poses a significant challenge for humanity, demanding focused attention from researchers and governments. Within aquatic environments, the emerging contaminants with potential ecotoxicological effects, even at low concentrations, have earned global interest among researchers. The persistence of these contaminants is exacerbated by specific physicochemical characteristics, hindering their natural degradation and removal through conventional water treatment methods. Biochar, a carbonaceous material produced through biomass pyrolysis at high temperatures, exhibits properties that effectively remove emerging contaminants from water. In this study, we investigated the impact of acidic biomass treatment on the removal efficiency of ivermectin from aqueous solutions. The materials were derived from untreated biomass, as well as basic and acidic-treated peanut shell (PS), subjected to pyrolysis at temperatures of 300, 400, 500, and 600 °C for 2, 3, and 4 hours. Characterization was conducted using TGA, ATR-FT-IR, SEM-EDS, and XRD. Quantification of ivermectin removal was performed using HPLC-DAD. The results showed that the removal was enhanced by temperature and time of pyrolysis, while the chemical treatments had different effects. The most effective removal tendency was observed with acidic biochar calcinated at 600 °C, demonstrating an average removal yield of 84.70%.