The discharge of residual dyes from manufacturing processes poses significant environmental risks. To address the need for efficient removal of the toxic dye methylene blue (MB) from water, a composite material was synthesized using biomass derived from banana peels and magnesium oxide (MgO) nanoparticles. Key operational parameters-including pH, contact time, composite dosage, and initial MB concentration-were systematically optimized to maximize MB adsorption. The composite was thoroughly characterized using advanced analytical techniques such as Fourier transform infrared (FTIR) spectroscopy, scanning electron microscopy (SEM), X-ray diffraction (XRD), and Brunauer-Emmett-Teller (BET) surface area analysis. The optimal conditions for MB adsorption were initially determined using the one-factor-at-a-time (OFAT) method and later confirmed through response surface methodology (RSM). The optimal parameters were found to be a pH of 7.6, a contact time of 30 min, an initial MB concentration of 80 mg/L, and a composite dosage of 20 mg. Under these conditions, the composite achieved an optimal MB removal efficiency of 96.45%. Kinetic analysis showed that the adsorption process followed a pseudo-second-order model, while equilibrium data aligned well with the Freundlich model. The composite exhibited a maximum adsorption capacity of MB was 76 mg/g of adsorbent. The adsorption mechanism involved chemisorption followed by physisorption, with electrostatic interactions playing a significant role. The collective findings underscore the efficacy of the agro-waste composite as a cost-effective adsorbent for removing MB from contaminated water. This study presents valuable insights into the potential application of such composites in environmental remediation efforts.