A magnetic nanosorbent was prepared from Fe3O4 nanoparticles and polyacrylamide using a solvothermal process. Two functions are achieved simultaneously in this process: The first consists in the formation of a carbon layer around the Fe3O4 nanoparticles, and the second one in the functionalization with an amido group. This combination allows the protection of Fe3O4 nanoparticles from dissolution in acid medium during heavy metal adsorption. The adsorbent was characterized by SEM, TEM, EDS, FTIR, TGA, and in terms of surface area. Results showed the Fe3O4 nanoparticles to be embedded in a sheet of carbon with folded surfaces which is functionalized with amido groups. The nanosorbent was applied to the enrichment of Cr(III), Co(II), Cd(II), Zn(II) and Pb(II) via magnetic solid phase extraction (mag-SPE). The effects of pH value, eluent type and sample volume were optimized. The validation of the procedure was verified by the analysis of a wheat gluten certified reference material (8418). The limits of detection for the above ions range from 1 to 110 ng L-1. The relative standard deviations are < 10%. The procedure was successfully applied to the enrichment of Cr(III), Co(II), Cd(II), Zn(II) and Pb(II) from various water and food samples.