Activated carbon derived from lignocellulose-rich groundnut shells was synthesized through chemical activation using potassium hydroxide (KOH) to enhance its surface area and porosity. The activation process involved impregnation with KOH and carbonization at elevated temperatures, resulting in groundnut shell-activated nanocarbon (GSANC) with highly developed micro and mesoporous structures. The KOH activation significantly improved the materials' surface area, creating numerous active sites that enhanced its adsorption capacity. This material demonstrated excellent compatibility for removing methylene blue (MB) dye from aqueous solutions, with its adsorption process being driven by electrostatic interactions, ?-? stacking, and hydrogen bonding. The high affinity of GSANC for MB highlights its potential as an effective adsorbent for wastewater treatment. GSANC exhibited a type I N2 adsorption-desorption isotherm with an H4 hysteresis loop, indicating a mixture of micro and mesopores, a high specific surface area of 665.802 m²/g, and an average pore diameter of 2.97 nm. Its maximum adsorption capacity (qmax) for MB was 212.766 mg/g.