Two new luminescent metal–organic frameworks (MOFs), namely, [Zn2(HL)2]n (1) and {[Cd2(HL)2(H2O)2]⋅(H2O)0.5}n (2) [H3L = 5‐((4‐(1H‐1,2,4‐triazol‐1‐yl)benzyl)amino)isophthalic acid ligand], have been solvothermally synthesized and characterized. Single‐crystal x‐ray diffraction shows that 1 exhibits a 3D framework, whereas 2 features 2D network. Furthermore, the fluorescence studies demonstrated that 1 and 2 exhibited luminescent sensing activity for nitrobenzene (NB), Fe3+ ions, and Cr2O72− anions with high selectivity, high sensitivity, and low detection limit, the corresponding detection limits of 1 were 6.40 × 10−7, 1.26 × 10−7, and 1.44 × 10−7 M, respectively, and that of 2 were 2.42 × 10−6, 3.41 × 10−7, and 2.90 × 10−7 M, respectively. 1 and 2 exhibited excellent solvent, pH, and thermal stabilities. The results suggested that both 1 and 2 can be considered as potential fluorescent sensors of NB, Fe3+ ions, and Cr2O72− anions.