Volatile organic compounds (VOCs) are a class of hazardous gases that are widely present in the atmosphere and cause great harm to human health. In this paper, a ratiometric fluorescent probe (Dye@Eu-MOFs) based on a dye-functionalized metal–organic framework was designed to detect VOCs, which showed high sensitivity and specificity for acetaldehyde solution and vapor. A linear correlation between the integrated fluorescence intensity (I510/I616) and the concentration of acetaldehyde was investigated, enabling a quantitative analysis of acetaldehyde in the ranges of 1 × 10−4~10−5 μL/mL, with a low detection limit of 8.12 × 10−4 mg/L. The selective recognition of acetaldehyde could be clearly distinguished by the naked eye under the excitation of UV light. The potential sensing mechanism was also discussed. Significantly, a molecular logic gate was constructed based on the whole system, and finally, a molecular logic network system for acetaldehyde detection connecting basic and integrated logic operations was realized. This strategy provided an effective guiding method for constructing a molecular-level logic gate for acetaldehyde detection on a simple platform.