Phenylpyrazoles are widely used pesticides in the food industry. It is highly desirable to develop efficient pre‐treatment and analysis methods to extract and detect phenylpyrazoles in complex food matrices. Herein, the study reports novel squaraine‐linked zwitterionic core‐shell magnetic covalent organic frameworks (MCOFs), which are found to be excellent pretreatment materials for the detection of trace phenylpyrazoles in samples. By coupling MCOFs to magnetic solid‐phase extraction (MSPE) with Ultra Performance Liquid Chromatography‐Tandem Mass Spectrometry (UPLC‐MS/MS) analysis, the detection of phenylpyrazoles (fipronil, fipronil sulfone, fipronil sulfide, fipronil de‐sulfoxide, fipronil desulfinyl, ethiprole, and flufiprole) is achieved and shows good linearity at concentrations of 1–800 µg L−1 (R2 ≥ 0.9930). The limit of detection (LOD), limit of quantification (LOQ), and recovery rates are 0.01–0.50 µg kg−1, 0.04‐1.72 µg kg−1, and 70.96–115.32%, respectively. More importantly, this method is successfully applied to determine the phenylpyrazoles in commercial egg, poultry, milk, jujube, cabbage, tea, and rice with a detection rate of ≈0.04%. Therefore, the developed method may contribute to a new strategy for the purification and multi‐target extraction of complex food matrices.