A novel magnetic solid base catalyst consisting of an MgFe 2 O 4 -MgO nanocomposite was successfully prepared by synthesizing magnesium ferrite (MgFe 2 O 4 ) as the catalyst support, and it was employed in an esterification reaction for the production of biodiesel. MgFe 2 O 4 was synthesized by a ball-milling mechanochemical method at various furnace temperatures (350°C, 550°C and 750°C), and the best results were obtained at 750°C. The results of TEM revealed an average size of 39 nm. A nanocomposite of MgFe 2 O 4 -MgO was successfully synthesized in this study, as confirmed by Fourier transform infrared (FTIR), X-ray diffraction (XRD), scanning electron microscopy-energy dispersive x-ray (SEM-EDX) and transmission electron microscopy (TEM) characterization. The results of the FTIR characterization revealed peaks with wavenumbers corresponding to Mg-O and Fe-O bonds in the range of 500-900 cm -1 , SEM mapping showed that MgO was distributed on the surface of the MgFe 2 O 4 catalyst support, and the MgFe 2 O 4 -MgO average size was found to be 50 nm by TEM. The influence of MgO on MgFe 2 O 4 was determined by varying the molar ratio of MgFe 2 O 4 to MgO from 1: 1, 1: 2 and 1: 3 and by studying the catalytic activity in the esterification of oleic acid to biodiesel. The best MgFe 2 O 4 -MgO nanocomposite have a molar ratio of 1: 2 and gave a percent conversion of 96.089%. Impregnating MgFe 2 O 4 with MgO increased the number of basic active sites, thereby increasing the catalytic activity. This type of nanocomposite is a promising new material for future catalysts.