Magnetic solid‐phase extraction (MSPE) strategy based on the Fe3O4@PDA/MIL‐101(Cr) has been proposed to separate and purify five common mycotoxins in licorice, including aflatoxin B1, aflatoxin G1, sterigmatocystin, zearalenone, and ochratoxin A. Integrating the MSPE and solid–liquid extraction/partitioning, a modified QuEChERS was established to adapt to the complex licorice samples. The Fe3O4@PDA/MIL‐101(Cr) was successfully synthesized and characterized by Fourier transform infrared spectroscopy (FT‐IR), scanning electron microscopy (SEM), transmission electron microscopy (TEM), and nitrogen adsorption–desorption isotherms. Sorbents with superior advantages for exclusion of matrix interference and extraction of target analytes in a short time were obtained, according to their ability of magnetic separation, high surface area (287.75 m2/g), large pore volume (0.61 cm3/g), and nanosized structure with mesopores. Prior to analysis with ultrahigh‐performance liquid chromatography‐tandem mass spectrometry (UHPLC‐MS/MS), several key parameters that would affect the sorbents’ extraction efficiency were extensively investigated. Under the optimized conditions, the practicality of the developed method for analysis of mycotoxins in licorice samples was confirmed by adequate linearity (R2 ≥ 0.9967), high sensitivity (LODs and LOQs, respectively, in the ranges 0.01–0.09 and 0.02–0.30 μg/kg), acceptable recovery (78.53%–116.28%), satisfactory reusability, and good interbatch precision of the sorbents (RSDs in the ranges 6.70%–11.20% and 6.02%–10.35%, respectively). The results indicated that the established method was feasible and reliable for the environment‐friendly and rapid screening of mycotoxins in complex licorice samples.