The valorization of lignocellulosic biomass with the aim of producing activated carbon is a strategy to combat pollution and protect the environment. The study is about the process for making activated carbon from peanut shells (AC-CAR) for the purpose to remove methylene blue (MB) in aqueous medium. After activation and characterization, the influence of adsorbent mass, pH, initial concentration of MB and duration of contact on the adsorption capacity of AC-CAR have been investigated. Additionally, kinetics, isotherms, and thermodynamic parameters were determined. Results show that the adsorption capacity increases with higher masses of AC-CAR and higher pH values of the adsorbate. Moreover, the equilibrium time is achieved at lower concentrations of MB. The pseudo-second-order kinetic model provides a more accurate representation of the adsorption kinetics of MB on AC-CAR. Langmuir mathematical model effectively describes the adsorption isotherm for the studied adsorbent/adsorbate system, with a maximum adsorption capacity of 109.89 mg/g. Thermodynamic parameters, including the free enthalpy (ΔGº < 0) and enthalpy (ΔHº = 20.94 kJ), show that the adsorption process is spontaneous and endothermic, respectively. The entropy value (ΔS = 95.798 J K−1) suggests a strong affinity between the adsorbent and the adsorbate. As a result, the generated activated carbon might be used as an adsorbent to remove cationic dyes in aqueous medium.