In this study, a covalent organic framework designated as TpPaNO was synthesized by a mechanochemical grinding method and then coated on stainless steel wire by a sol-gel technique to prepare a solid-phase microextraction fiber. The TpPaNO fiber based solid-phase microextraction coupled with gas chromatography-electron capture detection was applied to determine the residues of 11 pesticides (trlfuralln, dicofol, α-endosulfan, 1-chloro-4-[2,2-dichloro-1-(4-chlorophenyl)ethenyl]benzene, nitrofen, β-endosulfan, 1-chloro-4-[2,2-dichloro-1-(4-chlorophenyl)ethyl]benzene, 1,1,1-trichloro-2,2-bis(4-chlorophenyl)ethane, bifenthrin, permethrin and fenvalerate) in vegetable and fruit samples. The effects of extraction time, extraction temperature, sample pH, stirring rate and desorption temperature on the extraction efficiency were investigated. Under the optimized conditions, the limits of detection for the eleven pesticides were in the range of 0.04-0.25 μg/kg. The recoveries of the eleven pesticides in the vegetable and fruit samples were 81.5-111% with the relative standard deviations less than 11.2%.