In this work, TiO2 and Zn doped TiO2 nanoparticles (Zn-TiO2 NPs) were synthesized and served as SERS-active substrate for the detection of levofloxacin (LVFX) drug molecules. Both experimental and theoretical methods are used to study the enhanced mechanism and interaction between substrate and drug molecule. The results indicate that the LVFX is close to the substrate surface through the carboxyl group. The levofloxacin molecules adsorbed on Zn-TiO2 NPs exhibit the largest SERS enhancement, when the Zn content is 3%, the adsorption time is 7h and pH value is 6.78. The detection limit can be reduced to 1.29×10−7mol/L by this method. And, a quantitative detection method of LVFX can be established. There is a good linear relationship in the range of 1×10−3–1×10−7mol/L concentration.