Developing sensitive and effective methods to monitor oxytetracycline residues in food is of great significance for maintaining public health. Herein, a fluorescent sensor (NH2-UIO-66 (Zr)@MIP) based on a molecularly imprinted polymer-coated amino-functionalized zirconium (IV) metal–organic framework was successfully constructed and first used for the ultrasensitive determination of oxytetracycline. NH2-UIO-66 (Zr), with a maximum emission wavelength of 455 nm under 350 nm excitation, was prepared using a microwave-assisted heating method. The NH2-UIO-66 (Zr)@MIP sensor with specific recognition sites for oxytetracycline was then acquired by modifying a molecularly imprinted polymer on the surface of NH2-UIO-66 (Zr). The introduction of NH2-UIO-66 (Zr) as both a signal tag and supporter can strengthen the sensitivity of the fluorescence sensor. Thanks to the combination of the unique characteristics of the molecularly imprinted polymer and NH2-UIO-66 (Zr), the prepared sensor not only exhibited a sensitive fluorescence response, specific identification capabilities and a high selectivity for oxytetracycline, but also showed good fluorescence stability, satisfactory precision and reproducibility. The fabricated sensor displayed a fluorescent linear quenching in the OTC concentration range of 0.05–40 μg mL−1, with a detection limit of 0.012 μg mL−1. More importantly, the fluorescence sensor was finally applied for the detection of oxytetracycline in milk, and the results were comparable to those obtained using the HPLC approach. Hence, the NH2-UIO-66 (Zr)@MIP sensor possesses great application potential for the accurate evaluation of trace oxytetracycline in dairy products.