At room temperature, 2-aminomethylpyridine, Ln (NO 3) 3 Á6H 2 O and (E)-2-((3-methoxy-2-oxidobenzylidene)amino)ethanesulfonate (L 1) in methanol and acetonitrile to obtain four complexes: [Ln 2 (L) 2 (NO 3) 4 ] (Ln = Sm (1), Eu (2), Gd (3), Tm (4), and L = (E)-2-methoxy-6-(((pyridin-2-ylmethyl)imino) methyl)phenol). The original organic ligand L 1 and 2-aminomethylpyridine reacted in situ under the catalyzed condition of Ln III ion to form a new Schiff base ligand L. In the above process, firstly, the C = N double bond in the original Schiff base ligand L 1 is broken and further combines with 2-aminomethylpyridine to form a new Schiff base ligand L. As far as we know, this is rare in the formation of lanthanide complexes. When Complex 2 was subjected to luminescence test, it was found to have an extremely high selectivity to acetonitrile (CH 3 CN) and methylene chloride (CH 2 Cl 2). Therefore, after screening a variety of different organic solvents, here we explore a method that can quickly and efficiently respond to CH 3 CN/CH 2 Cl 2. In addition, we can visually distinguish the response of Complex 2 to multiple volatile organic compounds (VOCs). The magnetocaloric effect (MCE) test of Complex 3 showed 18.7 JÁkg −1 ÁK −1 at 2 K for ΔH = 5 T.