The aim of the study was to develop a novel formulation of levofloxacin and besifloxacin to achieve improved mucoadhesion and permeability of besifloxacin and levofloxacin through cornea for the effective treatment of ocular infections. A multicomponent hydrogel formulation containing chitosan-polyvinyl alcohol (PVA)-poly(N-vinylpyrrolidone) (PVP) was designed. Lysophosphatidylcholine was used to enhance corneal penetration of the drugs. The hydrogel preparations were characterized for various parameters, including clarity, pH, viscosity, in vitro release kinetics, mucoadhesion, ex vivo human corneal permeation, and antimicrobial efficacy. The formulations were compared with standard drug solution and marketed eye drops (Besix® and Levotop®). Compared to commercial ophthalmic preparations and free drug solutions, hydrogel formulation of both besifloxacin and levofloxacin was found to have 3.5- and 8-fold higher (P < 0.001) mucoadhesion and superior cumulative corneal permeation. The formulations showed superior in vitro anti-infective properties. Incubation of besifloxacin and levofloxacin formulations with Staphylococcus aureus-infected cornea model for 0.5 h showed greater potency of the hydrogel formulations compared to the marketed eye drops and standard solutions. The results of the study show the multicomponent hydrogel formulations of besifloxacin and levofloxacin to have superior corneal permeation with the potential for being used as topical ophthalmic preparations.