Three metal‐organic frameworks {[Cd(L)(glu)]⋅3 H2O}∞ (1), {[Cd2(L)2(adi)2]⋅5 H2O}∞ (2) and {[Cd(L)(sub)]⋅3 H2O⋅DMA }∞ (3) (L=pyridine‐3,5‐bis(5‐azabenzimidazole), H2glu=glutaric acid, H2adi=adipic acid and H2sub=suberic acid) were obtained under solvothermal conditions. Complex 1 shows a 2D (4,4) network constructing of Cd2‐glu and Cd‐L chains. Complex 2 presents a 2‐fold interpenetrating 3D framework with pcu topology. Complex 3 is a 3D framework with cds topology. Three complexes with versatile structures were obtained by changing aliphatic dicarboxylate ligands with different lengths based on a N‐rich ligand. Moreover, the fluorescence measurements indicate that complex 1 is a good multifunctional chemosensor for the detection of Cr2O72− and MnO4− anions by fluorescence quenching effect, and ethylenediamine by fluorescence enhancement effect, with detection limits of 1.196 ppm, 0.551 ppm and 64.572 ppm, respectively. Both complexes 2 and 3 can selectively sense Cr2O72− anion with detection limits of 1.126 ppm for 2 and 0.831 ppm for 3 by a fluorescence quenching effect.