Magnetic solid-phase extraction was used for the preconcentration of cadmium, lead, and cobalt in Moringa Oleifera with determination by flame atomic absorption spectrometry. Fe3O4 nanoparticles were modified by oleic acid to form the sorbent for magnetic solid-phase extraction. The modified sorbent was characterized by transmission electron microscopy, infrared spectroscopy, and X-ray diffraction. The preconcentration was optimized for the mass of nanoparticles, pH, adsorption time, the presence of coexisting ions, solution volume, eluent, and reuse. The optimized limits of detection were 0.09, 0.26, and 0.54 mu g/L for Cd(II), Pb(II), and Co(II) with relative standard deviations below 4.3%. The method was employed for the analysis of Moringa oleifera and recoveries between 90.0 and 102.0% were obtained.