High performance adsorbents are crucial for improving the efficiency of sample pretreatment and ensuring the accuracy and precision of analytical results. In this study, covalent organic framework COF-SCU1 was modified with metal-organic framework ZIF-8 for efficient extraction of toxic basic dyes in food. The prepared COF-SCU1@ZIF-8 exhibited improved dispersibility and more surface negative charges compared to COF-SCU1, thereby showing enhanced adsorption performance for auramine O, rhodamine B, basic orange 21, basic orange 22 and methylene blue. The dispersive solid-phase extraction (D-SPE) for toxic basic dyes based on COF-SCU1@ZIF-8 consumed tiny amount of adsorbent and solvent as well as short operation time. An analytical method for the determination of toxic basic dyes was developed based on D-SPE and high-performance liquid chromatography with detection limits of 0.9-1.6 ng mL