Herein, an optical sensor based on nanostructured molecularly imprinted polymer (MIP) coated on a luminescent zirconium metal–organic framework (MIP/Zr-LMOF) is introduced, and its performance is investigated for the fluorescent determination of chloramphenicol (CAP) antibiotic residues in milk and honey. To fabricate the sensor, the surface of Zr-LMOF is modified with MIP in the presence of CAP template, resulting in the introduction of recognition sites for antibiotic molecules. The porous structure of Zr-LMOF with specific binding sites for CAP recognition benefiting from coated MIP leads to selective and sensitive detection of antibiotic. The probe yields a linear range for detection of CAP in trace concentrations (0.16–161.56 µg.L−1) and provides a detection limit of 0.013 µg.L−1. Acceptable recoveries are achieved for antibiotic in real samples, which are consistent with that obtained from liquid chromatography–tandem mass spectrometry (LC-MS/MS), confirm the favorable performance of sensor for accurate determination of CAP in practical applications.