The main aim of this work is to treat sugarcane bagasse agricultural waste and prepare an efficient, promising, and eco-friendly adsorbent material. Biochar is an example of such a material, and it is an extremely versatile and eco-friendly biosorbent to treat wastewater. Crystal violet (CV)-dye and methylene blue (MB)-dye species are examples of serious organic pollutants. Herein, biochar was prepared firstly from sugarcane bagasse (SCB), and then a biochar biosorbent was synthesized through pyrolysis and surface activation with NaOH. SEM, TEM, FTIR, Raman, surface area, XRD, and EDX were used to characterize the investigated materials. The reuse of such waste materials is considered eco-friendly in nature. After that, the adsorption of MB and CV-species from synthetically prepared wastewater using treated biochar was investigated under various conditions. To demonstrate the study's effectiveness, it was attempted to achieve optimum effectiveness at an optimum level by working with time, adsorbent dose, dye concentration, NaCl, pH, and temperature. The number of adsorbed dyes reduced as the dye concentrations increased and marginally decreased with NaCl but increased with the adsorbent dosage, pH, and temperature of the solution increased. Furthermore, it climbed for around 15 min before reaching equilibrium, indicating that all pores were almost full. Under the optimum condition, the removal perecentages of both MB and CV-dyes were >= 98\%. The obtained equilibrium data was represented by Langmuir and Freundlich isotherm models. Additionally, the thermodynamic parameters were examined at various temperatures. The results illustrated that the Langmuir isotherm was utilized to explain the experimental adsorption processes with maximum adsorption capacities of MB and CV-dyes were 114.42 and 99.50 mgg(-1), respectively. The kinetic data were estimated by pseudo-first and pseudo-second-order equations. The best correlation coefficients of the investigated adsorption processes were described by the pseudo-second-order kinetic model. Finally, the data obtained were compared with some works published during the last four years.