Organophosphorus pesticides (OPPs) in foods pose a serious threat to human health, motivating the development of novel analytical methods for their rapid detection and quantification. A magnetic covalent organic framework (M-COF) adsorbent for the magnetic solid-phase extraction (MSPE) of OPPs from foods was reported. M-COF was synthesized by the Schiff base condensation reaction of 1,3,5-tris (4-aminophenyl)benzene and 4,4-biphenyldicarboxaldehyde on the surface of amino-functionalized magnetic nanoparticles. Density-functional theory (DFT) calculations showed that adsorption of OPPs onto the surface of M-COF involved hydrophobic effects, Van der Waals interactions, π-π interactions, halogen-N bonding, and hydrogen bonding. Combined with gas chromatography-mass spectrometry (GC-MS) technology, the MSPE method features low limits of detection for OPPs (0.002-0.015 µg/L), good reproducibility (1.45%-6.14%), wide linear detection range (0.01-1 µg/L, R≥ 0.9935), and satisfactory recoveries (87.3%-110.4%). The method was successfully applied for the trace analysis of OPPs in spiked fruit juices.