Aflatoxin (AFT) is an extremely toxic and highly toxic carcinogenic substance. This is particularly problematic due to the risk of aflatoxin contamination in raw feed materials and products during production, transportation, and storage. In this study, immunoaffinity magnetic beads (IMBs) were prepared for the purification of four aflatoxins (aflatoxin B1 (AFB1), aflatoxin B2 (AFB2), aflatoxin G1 (AFG1) and aflatoxin G2 (AFG2)). The aflatoxin contents were then determined rapidly and accurately using ultra performance liquid chromatography (UPLC). More specifically, the coupling ratio of magnetic beads (MBs) to the aflatoxin monoclonal antibody was initially optimized, wherein an MB volume of 1 mL and an antibody content of 2.0 mg was found to meet the purification requirements of this method. The magnetic properties of the MBs and the IMBs were then investigated using a vibrating sample magnetometer (VSM) at room temperature. As a result, the maximum saturation super magnetizations of the MBs and the IMBs were determined to be 28.61 and 23.22 emu/g, respectively, indicating that the saturation magnetization intensity of the IMBs was reduced by coupling with a non-magnetic antibody. However, the saturation magnetization intensity remained sufficiently high to permit magnetic separation from the solution. In addition, the appearance of the IMBs was examined using a biomicroscope, and it was clear that the magnetic cores were wrapped in agarose gel. Furthermore, the reaction time between the IMBs and the aflatoxins was investigated, and the optimal reaction time for meeting the purification requirements was determined to be 2 min. The stability of the IMBs was then evaluated under refrigerated storage conditions at 4 ℃. It was found that the prepared IMBs maintained a high aflatoxin enrichment capacity for at least eight months. Through the examination of three different extraction solutions, a mixture of acetonitrile and water (70∶30, v/v) was found to be optimal for the extraction of aflatoxins from the feed samples. Moreover, five sample dilutions and purification effects were also examined, and phosphate-buffered saline (containing 0.5% Tween-20) was selected as the preferred sample dilutant. With the optimized conditions, the effectiveness of using IMB for the purification of different feed samples was investigated. The resulting UPLC chromatogram showed no spurious peaks close to the target peaks, demonstrating a good purification performance. Following matrix spiking (5, 20, and 40 μg/kg, calculated based on AFB1) of the four feed samples (i. e., soybean meal, distillers dried grains with solubles, pig feed, and chicken feed), the spiked recoveries of the four aflatoxins ranged from 91.1% to 119.4% with a relative standard deviation (RSD) of <6.9%. In addition, the inter-day precision was 4.5% to 7.5%, and the method exhibited a good reproducibility. Subsequently, the developed method was used to detect AFB1 using reference materials. The test value was 18.6 μg/kg with an accuracy of 110.3%, thereby constituting satisfactory results. Upon testing 21 randomly purchased feed samples using this method, four of these samples contained AFB1, and the test results obtained using the developed method and stable isotope dilution LC-MS/MS were comparable. It was therefore apparent that the IMB purification method combined with UPLC analysis exhibited a good accuracy for aflatoxin determination. Thus, an automatic purification system was established to facilitate the operation and use of IMBs. This system was able to purify 24 samples simultaneously in 30 min. An IMB purification kit for was also designed and produced for aflatoxin detection in feed samples. The kit contained the sample dilutant, IMBs, the washing solution, and the eluent. After extraction of the feed sample, the extraction solution was added to the sample wells provided in the kit, and the purification system automatically completed the steps of aflatoxin enrichment, impurity washing, and elution of the target toxin. It should be noted that the purification process does not require the operator to manually add the solution, thereby simplifying operation. Overall, the purification method established in this study achieved the high-throughput and automatic purification of the four aflatoxins in feed samples.