It is critical for human health to develop sensitive and rapid analytical methods for detecting doxycycline (DOX) residues in food. This paper presents a novel metal-organic framework nanomaterial (Zn-MOF) based on dithiodiglycolic acid and its application in DOX detection by fluorescent probe method. Zn-MOF itself does not fluoresce. When DOX is added, the system exhibits strong fluorescence (100-fold) at 530 nm. The fluorescence intensity displayed an excellent linear relationship with DOX concentration with a detection limit of 2.7 nM. The reaction solution's fluorescence displayed a visible color shift from colorless to yellow that was concentration-dependent. A smartphone was used to detect DOX by recognizing the red, green, and blue values of the reaction solution and the corresponding test paper. The use of smartphones can speed up the detection process and streamline operations, offering a sensitive and visible method for the quantitative detection of DOX residues in actual samples. Interestingly, Zn-MOF can discriminate DOX from other tetracyclines with high selectivity. This material has been used successfully as a fluorescent probe to determine DOX in fish samples with an average spiked recovery of 94.6 % ∼ 95.1 %. The DOX levels in the measured perch samples were 1.25 ∼ 157 μg/kg. There are 2 batches of DOX exceeding the standard in 14 batches.