An imidazole functionalized metal–organic framework (MOF), [Cu(HL)(H2O)]·(H2O)·(DMA) (HBU‐166, H3L = 4,4′,4″‐(1H‐imidazole‐2,4,5‐triyl)tribenzoic acid, DMA = N,N‐dimethylacetamide) was synthesized and characterized by single‐crystal X‐ray diffraction. HBU‐166 was observed as a two‐dimensional MOF and showed good stability in water, an acidic solution (pH = 4), and an alkaline solution (pH = 9). HBU‐166 exhibited ligand‐based luminescence with a blue shift, which could be attributed to the coordination effect. Moreover, HBU‐166 could be applied to detect nitroaromatic compounds (NACs) and metal ions in water with preferable selectivity and sensitivity. In particular, HBU‐166 could be used as a promising luminescent sensor for picric acid (PA) with enhancement of emission intensity. The mechanism for PA detection likely involved electron transfer and weak interaction between ligand and electron‐deficient of NACs at the beginning to increase the emission intensity. Additionally, HBU‐166 exhibited excellent selectivity in the sensing of 4‐nitrophenol and Fe3+ through fluorescence quenching.