A Base Converter was established in an anaerobic environment, and KOH served as an activator for sesame-straw-based materials at a high temperature. D-BC carboxyl-functionalized biochar was prepared by grinding DL-malic acid with BC to adsorb the azo dye reactive bright red X-B, and the promoting effect of carboxyl groups in the adsorption process was explored. The biochar before doping, after doping, and after adsorption were all characterized and analyzed by SEM, BET, XPS and FTIR. Single-factor experiments and model fitting were used to study the adsorption processes of BC and D-BC, and it was found that the surfaces of BC and D-BC consist of dense rhombic pores with a large specific surface area. Adsorption of X-B on BC and D-BC is primarily electrostatic adsorption, hydrogen bond interaction and $\pi$-$\pi$ interaction; the surface functional groups of BC are relatively scarce, so physical adsorption dominates. The relatively large amount of -COOH in D-BC promotes the occurrence of electrostatic attraction and hydrogen bonding, and is therefore considered to have some chemical adsorption characteristics. Both BC and D-BC belong to monolayer adsorption, and the maximum adsorption capacity of D-BC can reach 2877.59 mg/g, which is more than 1.5 times that of BC.