The integration of tetracycline (TC) detection and treatment within a single system is significant but challenging. This work presents a 3D Eu-based metal-organic framework (Eu-MOF) and its AgI@Eu-MOF composite, both of which serve as fluorescence turn-off sensors for monitoring TC, exhibiting high sensitivities with limits of detection (LODs) of 74.9 nmol·L-1 (nM) and 0.117 μM, respectively. The TC concentration (CTC) can be quantitatively determined using the linear fitting equations (I0 - I)/I = 3.828 × 104CTC for Eu-MOF with CTC = 9.9-90.9 μM and (I0 - I)/I = 2.1576 × 104CTC for AgI-30@Eu-MOF with CTC = 9.9-74.1 μM. The fluorescence assays using Eu-MOF and AgI@Eu-MOF were applied to lake water and tap water, whose measured CTCs were very close to the spiked CTCs, and the fluorescence recoveries were around 100%, supporting the accuracy and reliability. AgI@Eu-MOF loading 30 wt % AgI (AgI-30@Eu-MOF) was also a photocatalyst for TC photodegradation with a removal efficiency of up to 83.87%, a photocatalytic reaction rate of 0.0466 min-1, and a stable recyclability in five cycles. The TC photocatalytic degradation of AgI-30@Eu-MOF was proposed as a Z-type heterojunction mechanism with the generation of •O2-, h+, and •OH free radicals. The AgI@Eu-MOF provides a solution for TC detection and treatment by integrating a fluorescence sensor and photocatalyst within a single system.