The development of highly-sensitive recognition of hazardous chemicals, such as volatile organic compounds (VOCs) and polycyclic aromatic hydrocarbons (PAHs), is of significant importance because of their widespread social concerns related to environment and human health. Here, we report a three-dimensional (3D) covalent organic framework (COF, termed JUC-555) bearing tetraphenylethylene (TPE) side chains as an aggregation-induced emission (AIE) fluorescence probe for sensitive molecular recognition. Due to the rotational restriction of TPE rotors in highly interpenetrated framework after inclusion of dimethylformamide (DMF), JUC-555 shows impressive AIE-based strong fluorescence. Meanwhile, owing to the large pore size (11.4 Å) and suitable intermolecular distance of aligned TPE (7.2 Å) in JUC-555, the obtained material demonstrates an excellent performance in the molecular recognition of hazardous chemicals, e.g., nitroaromatic explosives, PAHs, and even thiophene compounds, via a fluorescent quenching mechanism. The quenching constant (KSV) is two orders of magnitude better than those of other fluorescence-based porous materials reported to date. This research thus opens 3D functionalized COFs as a promising identification tool for environmentally hazardous substances.