Strengthening the supervision and detection of aristolochic acids (AAs) is an essential prerequisite for safeguarding drug and food safety. In this work, a novel analytical method was developed by combining the Fe3O4@COF-LZU1 based magnetic solid-phase extraction (MSPE) with high-performance liquid chromatography tandem mass spectrometry (HPLC-MS/MS) for trace quantification of aristolochic acid I and aristolochic acid II. Fe3O4@COF-LZU1 was fabricated via a rapid room-temperature in-situ growth strategy, exhibiting rosette-like surface morphology, a core-shell architecture, and fast magnetic responsiveness. Adsorption model fitting, computational simulations and recycling experiments were systematically performed to elucidate the adsorption mechanism and performance of Fe3O4@COF-LZU1 towards AAs. The developed method exhibited favorable analytical performance for Chinese patent medicines and wheat grain samples, with a wide linear range of 0.125-100 ng g-1, low limits of detection ranging from 0.01 to 0.03 ng g-1, high precision with relative standard deviations below 7.7%, and satisfactory accuracy with recoveries of 85.0%-103.5%. Neither aristolochic acid I nor aristolochic acid II was detected in the collected real samples of Chinese patent medicines and wheat grains. This study provides a facile and reliable strategy for the fabrication of magnetic COF-LZU1 and highlights its promising application potential in sample pretreatment.