Coordination polymers (CPs) possessing Zn2+ and Cd2+ display interesting photoluminescent properties, thereby finding utility as luminescent sensors to detect traces of molecular substances. Herein, new Cd(ii) and Zn(ii)-based coordination polymers (CPs) with formulae [Cd3(L)3(3,5-bipy)6(H2O)3<middle dot>H2L<middle dot>5H2O] (1) and [Zn(HL)2(3,5-bipy)2] (2) were synthesized utilizing 1,4-naphthalenedicarboxylic acid (H2L) as the main ligand and 3,5-bis(benzimidazol-2-yl)pyridine (3,5-bipy) as the co-ligand and characterized. These CPs exhibited luminescent properties. Upon exciting their aqueous suspensions at 360 nm, both 1 and 2 exhibited broad emissions at 461 nm and 457 nm, respectively, with 1 displaying more intense emission than 2. Furthermore, employing these CPs as luminescent sensors for sensing antibiotics in aqueous media suggest that both 1 and 2 display selective and sensitive sensing towards tetracycline (TCY). 1 and 2 demonstrated limit of detection (LOD) values of 6.21 x 10-6 M and 1.07 x 10-5 M, respectively, accompanied with Stern-Volmer constants (Ksv) of 2.08 x 104 M-1 and 1.24 x 104 M-1. Additionally, recoveries in the luminescent responses of both 1 and 2 were successfully achieved through titration-back experiments using salicylic acid (SA). The integrated experimental and computational techniques suggest that the decline in emission intensity of CPs in the presence of antibiotics is due to energy/charge transfer and interaction with TCY, inducing minor alterations in the framework. These alterations form a non-fluorescent ground state complex (GSC) that alters the electron communication and decreases the photoluminescent intensity. Also, restoration in the emissive responses of TCY@CP arises due to the SA-assisted release of TCY from TCY@CP, which leads to restoration of the emissive responses.