Two lanthanide 3D coordination polymers [Ln 2 (L) 4 Cl 2 (H 2 O) 4 ] n (Ln = Eu (1), Gd (2)) with quinoline-2carboxylic acid (HL) as the ligand were successfully synthesized and characterized. Complex 1 exhibits a highly sensitive and selective luminescent response to 2,6-dipicolinic acid (DPA) in tap water and is virtually unaffected by interferences such as amino acids, aromatic carboxylic acids, and ions. With the addition of DPA, the luminescence intensity of complex 1 decreases rapidly to the naked eye. The detection limit of 1 toward DPA is 3.36 μM, which is much less than the infectious dose (60 μM) of the anthrax spores, indicating the high sensitivity of 1 to DPA. This study offers a basis for employing lanthanide complexes in real sample analysis, enabling direct and efficient detection of DPA with high sensitivity and specificity. Additionally, it is noteworthy that at a magnetic field strength of 7 T and a temperature of 3 K, the maximum entropy change for complex 2 attains a value of 23.56 J kg −1 K −1 .