Flemingia philippinensisMerr.et Rolfe (F. philippinensis) is an important food ingredient as well as a traditional Chinese medicine with numerous pharmacological actions. Unfortunately, there was no defined method for monitoring the quality of F. philippinensis in the Chinese Pharmacopoeia. In this study, a magnetic covalent organic framework molecularly imprinted polymers (MCOFs-MIPs) was prepared using MCOFs as a support material, genistein (Gen), which was abundant in F. philippinensis, as a template molecule, and acrylamide as a functional monomer. The preparation process of MCOFs-MIPs was optimized and their structures and adsorption characteristics were characterized. In the selectivity test, the imprinting factor of Gen was 1.93, demonstrating that the imprinting effect of MCOFs-MIPs could selectively enrich Gen in complex samples. Following that, a new and effective quality control method (Gen-MCOFs-MIPs-HPLC) was established to determine Gen content in F. philippinensis roots. The method showed good linearity (R2 = 0.9936) in the range of 0.12–80 µg mL−1. The recoveries of Gen in F. philippinensis high, medium and low samples were 90.5–91.0 %, 92.1–100.1 and 92.8–100.8, respectively. Stability and reproducibility tests revealed that this method was stable (RSD of 1.20 %) and reproducible (RSD of 0.70 %). Moreover, the calculation showed that the amount of Gen in the F. philippinensis powder was 0.4489 mg g−1. As a result, the approach was shown to be simple, repeatable, and stable, and it provided a sensitive and reliable method for the extraction and detection of Gen in natural products.