It is a challenging task to develop metal−organic frameworks (MOFs) with fascinating architectures and outstanding performance. In this work, two novel Cd(II)-MOFs, [Cd 2 (L1)-(BDC) 2 •1.5i-PrOH] n (1) and [Cd(L2) 0.5 (BDC)(H 2 O)] n (2), with distinct sensing performances are successfully synthesized by pyridyl/pyrimidyl-containing functional ligands 9,10-bis(di-(pyridine-4-yl)methylene)-9,10-dihydroanthracene (L1) and 9,10bis(di(pyrimidin-5-yl)methylene)-9,10-dihydroanthracene (L2). 1 exhibits a 3D (4,6,10)-connected multicylindrical framework with compartments, constructed by 4-connected L1 and BDC 2− in modes A and B, 6-connected Cd1, and 10-connected [Cd 2 (COO) 2 ] 2+ . 2 is fabricated by 4-connected BDC 2− , 7connected Cd, and L2 bridges to generate a 3D (4,7)-connected pillar-layered framework with uncoordinated pyrimidyl N active sites. More importantly, their topologies have not been reported thus far. 1 and 2 have excellent water, pH, and thermal stabilities. 1 can efficiently sense TNP and MDZ in H 2 O, but its Al 3+ sensing ability is relatively average. In sharp contrast, 2 has ultrahigh Al 3+ sensitivity. Its limit of detection (LOD) toward Al 3+ (2.93 × 10 −7 M) is nearly 2 orders of magnitude and 25 times lower than that of 1 (1.18 × 10 −5 M) and the WHO's maximum Al 3+ limit (7.41 × 10 −6 M) in drinking water, respectively. Their sensing mechanisms and different sensing performances are explored in depth.