We aimed to establish an automated versatile sample preconcentration method based on the modified immunomagnetic beads, which was utilized to enrich for aflatoxin B1 from the matrices. The critical main parameters affecting the extraction efficiency, such as usage amount of immunomagnetic beads, reaction time, elution time, and blending way were investigated. Under the optimized conditions, the content of aflatoxin B1 was analyzed by high‐performance liquid chromatography, the mobile phase consists of water–acetonitrile–methanol (42:18:10, v/v/v), and fluorescence detection was performed with excitation and emission wavelengths at 360 and 440 nm, respectively. Moreover, the performance of preconcentration method was compared with the conventional method based on the immunoaffinity column. The accuracy of two clean‐up methods was within the error range. In addition, the stability and recyclability of the immunomagnetic beads was studied by recycling them five times. The results for the respective analysis in various samples demonstrated that the developed extraction platform provides a promising approach that is simple, rapid, sensitive, and easy to use.