This study presented a facile synthesis route via the precipitation method for the production of magnetic biochar from oil palm frond (OPF). The physicochemical characteristics including surface, functional, and magnetic properties of the synthesized magnetic biochar revealed that the surface morphology, porosity, and magnetic properties enhanced its adsorption capacity for the removal of crystal violet (CV) and sunset yellow (SY) from aqueous solution. The saturation magnetization of OPF biochar was found to be 8.41 emu/g, coercivity (Hc) of 83.106 G, and retentivity (Mr) of 1.475 emu/g which implies that OPF magnetic biochar can be facilely separated from aqueous solution. The result also demonstrated superparamagnetic properties which provided suitable magnetic responsive characteristics to an external magnetic field. The interactive effect of the operational conditions of pH, adsorbent dosage, initial concentration, and temperature was investigated in a batch adsorption study using the central composite design (CCD) of the response surface methodology (RSM). It was indicated that an increase in adsorbent dosage to 1.0 g/L at a lower initial concentration (50 ppm) conducted at 20 °C favoured optimum removal of CV and SY at pH 11 and 4, respectively. The Langmuir isotherm model with maximum adsorption capacity ($$q_{\max }$$
q
max
) of 149.03 and 342.47 mg/g was achieved for CV and SY dyes, respectively. The kinetic data proved to be best fitted to the pseudo-second-order kinetic model. Thermodynamic parameters revealed spontaneous and endothermic reactions. The suitability and sustainability of the magnetic biochar were enhanced by its regeneration potential for effective adsorption of CV and SY after 5 cycles which indicates its outstanding reusability. Hence, OPF magnetic biochar exhibited prospective application for the removal of dyes from wastewater.