TAPT-AN-COF, an imine-based covalent organic framework, was synthesized by a solvothermal method of 2,4,6-trihydroxy-benzene-1,3,5-tricarbaldehyde (TP) and 4,4',4″-(1,3,5-Triazine-2,4,6-triyl)trianiline (TAPT). The structure was characterized and tested by several techniques, revealing that the material had good stability and high specific surface area. The adsorption experiment demonstrates that the adsorption isotherm of TAPT-AN-COF followed the Freundlich isothermal equation, while its adsorption kinetics conformed to the pseudo second-order kinetic model. After characterization, the prepared TAPT-AN-COF was used to separate and enrich nitroimidazoles (NDZs) in milk and meat as the solid-phase extraction (SPE) adsorbent. The effects of adsorbent dosage, pH value, washing solvent, elution solvent type and volume on recoveries were studied. Under the optimal conditions, a method for the determination of NDZs in milk and meat samples was established based on high performance liquid chromatography-ultraviolet detection(HPLC-UVD).The result showed that NDZs had good linearity in the concentration range of 25-500 µg·kg