It is essential to design multifunctional contact lenses for selective recognition and utilization of the eye drop ofloxacin (OFL). Modified silicone hydrogel (MSL) contact lenses were firstly synthesized via ultraviolet curing by using (hydroxymethyl)methyl aminomethane, polydimethylsiloxane, methacryloxypropyl terminated polydimethylsiloxane, and N,N-dimethylacrylamide as monomers and N-vinyl-2-pyrrolidinone (NVP) as a modifier. The synthesized MSL contact lenses were characterized via Fourier transform infrared spectroscopy, scanning electron microscopy, and contact angle and mechanical property tests. The results showed that compared with silicone hydrogel (SL) contact lenses, the MSL contact lenses had a more porous structure and good swelling and mechanical properties. The molecularly imprinted polymer/ofloxacin-modified silicone hydrogel (MIP/OFL-MSL) contact lenses were firstly synthesized via free radical polymerization, using ofloxacin (OFL) as the template molecule. Moreover, compared with chlorogenic acid and myricetin molecule, the MIP/OFL-MSL contact lenses exhibited an adsorption capacity for OFL that reached 2.86 mg/g. The antibacterial test showed that the MIP/OFL-MSL contact lenses displayed an inhibition ring size of 15.2 mm and 17.8 mm for Staphylococcus aureus and Escherichia coli, respectively.