Developing effective means for detecting contamination in milk during production, processing, and storage is both important and challenging. Tetracycline (TC), due to its use in treating animal infections, is among the most prevalent organic pollutants in milk, posing potential and significant threats to human health. However, efficient and in situ monitoring of TC remains lacking. Nevertheless, we have successfully developed a highly sensitive and selective fluorescence method for detecting TC in milk using a metal–organic framework material made from Yb‐TCPP (ytterbium‐tetra(4‐carboxyphenyl)porphyrin). The calculated Stern–Volmer constant (KSV) was 12,310.88 M−1, and the detection limit was 2.44 × 10−6 M, surpassing previous reports. Crucially, Yb‐TCPP fluoresces in the near‐infrared region, promising its development into a specific fluorescence detection product for practical TC detection in milk, offering potential application value.