This study aimed to evaluate sugarcane bagasse as a precursor for the synthesis of magnetic carbonaceous material (MC) produced at 230 °C via hydrothermal carbonization, followed by an activation process with KOH (1:2 and 1:4; m:m) at 700 °C under a nitrogen atmosphere (MAC). The study assessed the structure, texture, and adsorption capacity of MC and MAC for the dye methylene blue (MB). FTIR analysis was performed to investigate the structural properties, while BET and BJH analyses were conducted to determine the specific surface area and pore volume. A batch adsorption experiment was carried out to evaluate the adsorption capacity for MB. The results demonstrated that using sugarcane bagasse as a precursor enables the sustainable production of an efficient adsorbent with high adsorption capacity after KOH activation. This study contributes to the development of safe products and promotes atomic economy by utilizing biomass, aligning with the principles of Green Chemistry.