Background: With the goal of "personalizing" the patient's dosage regimen, the concentration of the drug is measured in biological fluids as a part of therapeutic drug monitoring (TDM). A reproducible and disposable molecularly imprinted polymer (MIP)based potentiometric sensor was constructed as a TDM analysis platform for levofloxacin (LVF) assay in spiked plasma samples and pharmaceutical formulation. Materials and methods: In order to obtain high selectivity for the drug, a host guest interaction technique was employed, using methacrylic acid (MAA) as a functional monomer and ethylene glycol dimethacrylate (EGDMA) as a cross linker in the presence of the template, LVF. Fourier transform infrared (FT-IR) spectroscopy was used for polymer structural characterization. Results: the sensor responded quickly within 3-5 seconds in the pH range (3.0 -6.0). Within the concentration range of (1 × 10 -5 -1 × 10 -2 M), the potential profile showed a linear relationship with limit of detection (LOD) of 7.41 × 10 -6 M. Significantly, the selectivity towards LVF was promoted using the MIP modified sensor. The sensor was successfully employed for LVF assay in spiked plasma samples and pharmaceutical dosage form without any interference from any common additives or excipients. Using analytical eco-scale and Green Analytical Procedure Index (GAPI) techniques, the suggested method's greenness was assessed, and it showed outstanding green analysis. Conclusion: the obtained results showed that the developed MIP-based sensor is selective, simple, easily handled, and rapid for LVF assay in pure form, spiked plasma samples, and tablets with good selectivity, accuracy, and precision.