The aim of this work was to develop drug-soft contact lens combination products suitable for controlled release of antimicrobial peptides on the ocular surface. Incorporation of functional monomers and the application of molecular imprinting techniques were explored to endow 2-hydroxyethyl methacrylate (HEMA) hydrogels with the ability to load and to sustain the release of polymyxin B and vancomycin. Various HEMA:drug:functional monomer:crosslinker molar ratios were evaluated to prepare polymyxin B imprinted and non-imprinted hydrogels. Acrylic acid-functionalized and imprinted hydrogels loaded greater amounts of polymyxin B and led to more sustained release profiles, in comparison to non-functionalized and non-imprinted networks. Polymyxin B-loaded hydrogels showed good biocompatibility in HET-CAM tests. Functionalized hydrogels also loaded vancomycin and sustained its release, but the imprinting effect was only exhibited with polymyxin B, as demonstrated in rebinding tests. Microbiological assays carried out with Pseudomonas aeruginosa allowed identification of the most suitable hydrogel composition for efficient bacteria eradication; some hydrogels being able to stand several continued challenges against this important bacterial pathogen.