Highly selective and sensitive quantitative detection of ofloxacin (OFX) at ultra‐low concentrations in aqueous media and development of new afterglow materials remains a challenge. Herein, a new 2D water‐stable lanthanide metal‐organic framework (NIIC‐2‐Tb) is proposed, which exhibits high selectivity towards OFX through the luminescence quenching with the lowest detection limit (1.1 nM) reported to date and a fast response within 6 s. In addition, the luminescence detection of OFX by NIIC‐2‐Tb was not affected by typical components of blood plasma and urine. The excellent sensing effect of NIIC‐2‐Tb was further utilized to prepare a composite functional sensing carrageenan hydrogel material for the rapid detection of OFX in meat in real time and the first discovery of impressive afterglow in MOF‐based hydrogels. This study not only presents novel Ln‐MOF materials and Ln‐MOF‐based hydrogel films for luminescent sensing of OFX, but also demonstrates color‐tunable luminescent films with afterglow, which expands the application of composite luminescent materials for detection and anti‐counterfeiting.This article is protected by copyright. All rights reserved