The work presented herein reports on the synthesis, structural and physico-chemical characterization, luminescence properties and luminescent sensing activity of a family of isostructural coordination polymers (CPs) with the general formula [Ln2(μ4-5Meip)3(DMF)]n (where Ln(III) = Sm (1Sm), Eu (2Eu), Gd (3Gd), Tb (4Tb) and Yb (5Yb) and 5Meip = 5-methylisophthalate, DMF = N,N-dimethylmethanamide). Crystal structures consist of 3D frameworks tailored by the linkage between infinite lanthanide(III)-carboxylate rods by means of the tetradentate 5Meip ligands. Photoluminescence measurements in solid state at variable temperatures reveal the best-in-class properties based on the capacity of the 5Meip ligand to provide efficient energy transfers to the lanthanide(III) ions, which brings intense emissions in both the visible and near-infrared (NIR) regions. On the one hand, compound 5Yb displays characteristic lanthanide-centered bands in the NIR with sizeable intensity even at room temperature. Among the compounds emitting in the visible region, 4Tb presents a high QY of 63%, which may be explained according to computational calculations. At last, taking advantage of the good performance as well as high chemical and optical stability of 4Tb in water and methanol, its sensing capacity to detect 2,4,6-trinitrophenol (TNP) among other nitroaromatic-like explosives has been explored, obtaining high detection capacity (with Ksv around 105 M−1), low limit of detection (in the 10−6–10−7 M) and selectivity among other molecules (especially in methanol).