The development of a highly selective and sensitive method for detecting chlortetracycline (CTC) is crucial for safeguarding public health and food safety. Herein, a novel ratiometric fluorescence sensor called SiC@ZIF-8@MIP was constructed to specifically recognize and sensitively detect CTC. The sensor has the advantages of fast response speed (7 min), wide linear range (0.1–18 μg mL−1), and low limit of detection (4.56 ng mL−1). With the addition of CTC, the fluorescence of SiC@ZIF-8@MIP is quenched at 410 nm due to the internal filtration effect (IFE) and a new fluorescence signal is generated at 515 nm by CTC due to the aggregation induced emission effect (AIE). Additionally, for rapid on-site detection of CTC, a smartphone is applied to digitize fluorescence images of SiC@ZIF-8@MIP, helping individuals read and analyze the images. This detection method is a promising strategy for on−site assessments of food safety and public health safety.