A three-dimensional Cd(II)–organic framework, formula as [Cd(tib)2∙(NO3)2]∙4DMF (tib = 1,3,5-tri(1H-imidazol-1-yl)benzene and DMF = N, N-dimethylformamide), has been successfully constructed by solvothermal synthesis. The as-made complex has been investigated and characterized by single X-ray diffraction, elemental analysis, powder X-ray diffraction, thermogravimetric analyses, luminescent spectra, and UV–Vis adsorption spectra. By virtue of its stability and luminescent property, this complex can used as a luminescent sensor toward picric acid and nitrofurantoin. The calculated KSV value is approximate 1.29 × 104 M−1 with the R2 value of 0.9946 for picric acid and 3.02 × 104 M−1 with the R2 value of 0.9973 for nitrofurantoin. Meanwhile, this as-synthesized complex has good recyclability.