Optimization of the sonication-assisted synthesis of magnetic Moringa oleifera (MMO) was carried out, to produce an efficient coagulant for palm oil mill effluent treatment. Response surface methodology (RSM) was used to analyse the effect of magnetic nanoparticles (MNPs) composition, sonication time and sonication temperature on coagulation performances to remove total suspended solid (TSS), colour, chemical oxygen demand (COD) and sludge volume index (SVI)). The RSM analyses indicate 1.0 wt% of MNPs, 2.35 min and 50 °C as the optimal MNPs mass fraction, sonication time and sonication temperature, respectively in order to fabricate an efficient MMO coagulant. The analysis of variance (ANOVA), indicate that mass fraction of MNPs and sonication temperature are the most significant parameters. From the statistical analysis, the sonication time did not exert any influence on the fabrication of MMO as well as its coagulation performance. At the optimum conditions, 83.3%, 28.1%, 85.2% removal of TSS, colour, COD as well as 485 mL/g of SVI were respectively achieved. This paper also present the characterization studies on the synthesized MMO using Fourier transform infrared spectroscopy, X-ray diffractometry, scanning electron microscopy and vibrating sample magnetometer analysis. • Magnetic Moringa Oleifera (MMO) coagulant was synthesized via ultrasonic-assisted technique. • Optimization study on synthesis conditions was carried out by response surface methodology. • Magnetic composition and sonication temperature were the significant synthesis factors. • The developed MMO coagulant exhibited ferromagnetic properties.