The precedence of high levels of antibiotics in animal-derived foods such as honey poses a significant food safety risk. Therefore, the development of an accurate, and reliable method for determining these residues is crucial. In this study, a new extraction method was proposed for the simultaneous determination of chloramphenicol and florfenicol residues in honey samples prior to high performance liquid chromatography analysis. The method involved using amino-functionalized UiO-66 metal–organic framework (NH2-UiO-66) as a sorbent in a narrow bore tube. To begin, the solution was placed into a narrow bore tube and the pH was adjusted to 6. Then, 100 mg of the sorbent was added to the solution. The particles were slowly passed through the solution and collected in the tube bottom. After removing the supernatant phase, 55 µL of 1-butyl-3-methylimidazolium tetrachloroferrate (III) magnetic ionic liquid was used as the elution solvent under sonication for 3 min. The optimized method exhibited low limits of detection (0.19 and 0.44 ng g−1) and quantification (0.63 and 1.4 ng g−1), good extraction recovery (81 and 74 %), and good linearity of the calibration curve (r2 ≥ 0.996) over the ranges of 1.2–500 and 2.4–500 ng g−1 for florfenicol and chloramphenicol, respectively. Precision was satisfactory, with relative standard deviations ≤8.1 % for both intra- and inter-day precisions. The developed method was done on ten honey samples and chloramphenicol was found in five samples.