The application of a simple, fast, and cheap sample pre-concentration technique based on the dispersive magnetic Fe3O4 nanoparticle solid-phase extraction has been developed for extraction and determination of aflatoxins B1, B2, G1, and G2 in nut and cereals. Aflatoxins were extracted from samples with a mixture of methanol-water 8:2 (v/v) and then by magnetic Fe3O4 nanoparticles and a 500 mu L of chloroform; pre-concentration and cleanup of the analytes simultaneously were done. HPLC with fluorescence detector and electrochemical post-column derivatization has been used for aflatoxin determination. The main parameters affecting the extraction efficiency, such as type and volume of extraction solvent, the volume of water, and sample volume, were investigated and optimized to achieve the best extraction efficiency. The LODs and LOQs of the proposed method for the AFs were determined, which LODs were 0.35 and 0.06 mu g/kg, and LOQs were 1 and 0.2 mu g/kg, for aflatoxin groups B and G, respectively. Acceptable recoveries were achieved (76.0-112.7%), and the low limits of detection (LOD < 0.35 and 0.06 mu g/kg), with proper precision (RSD < 15%), were obtained. Therefore, the validated method represents simple and low-cost substitute to the conventional method and is suitable for screening of contamination in food samples.