In this study, we developed a novel and cost-effective method for the preparation of KOH-activated pyrolyzed wheat straw biochar composite (KOH-BM-Biochar) using a two-step co-modification approach that involved KOH activation and ball milling. The characterization of KOH-BM-Biochar included assessments of particle size diameter, zeta potential, energy-dispersive secondary electron microscopy, Brunauer-Emmett-Teller theory, X-ray diffraction, Fourier-transform infrared spectroscopy, and X-ray photoelectron spectroscopy. The maximum adsorption capacity of methylene blue (MB) on KOH-BM-Biochar was found to be 300.66 mg·g− 1, and an adsorption efficiency of 95.00% was achieved within 180 minutes at pH 8.0. Kinetic analysis using a pseudo-second-order model (R2 > 0.99) indicated that chemical adsorption was the predominant rate-limiting step. Experimental data fitting to the Temkin and Freundlich isotherm models demonstrated favorable, heterogeneous, and multilayer adsorption. Thermodynamic studies revealed that the adsorption of MB onto KOH-BM-Biochar was endothermic and spontaneous. The adsorption mechanism was attributed to hydrogen bonds, π-π stacking interactions, electrostatic attractions, and heterogeneous diffusion. Overall, this low-cost co-modification method holds significant promise, and KOH-BM-Biochar has emerged as an effective adsorbent for the removal of MB dye from aqueous solutions.