Sample pretreatment is a vital step in the detection of mycotoxins, and traditional pretreatment methods are time-consuming, labor-intensive and generate much organic waste liquid. In this work, an automatic, high-throughput and environmentally friendly pretreatment method is proposed. Immunomagnetic beads technology and dispersive liquid–liquid microextraction technology are combined, and the zearalenone in corn oils is directly purified and concentrated under the solubilization effects of surfactant. The proposed pretreatment method allows for the batch pretreatment of samples without pre-extraction using organic reagents, and almost no organic waste liquid is produced. Coupled with UPLC-FLD, an effective and accurate quantitative detection method for zearalenone is established. The recovery of spiked zearalenone in corn oils at different concentrations ranges from 85.7 to 89.0%, and the relative standard deviation is below 2.9%. The proposed pretreatment method overcomes the shortcomings of traditional pretreatment methods and has broad application prospects.