Topical administration is the commonly preferred method of administering ophthalmic formulations, with the majority of available medications in the form of eye drops or ointments. However, the topical application of ophthalmological medications has less bioavailability and a short residence time because of the physiological and anatomical constraints of the eye, making efficient ophthalmic drug delivery a challenging task. Microfluidic contact lenses have the advantage of delivering drugs into the eye in a controlled and on-demand manner. Here, we showcase the use of hydrogel-embedded microcavities on PDMS-based contact lenses for ocular drug delivery applications. The fabrication technique adopted here is the spontaneous formation of the spherical cavity by hydrogel monomer droplet, followed by the simultaneous thermal curing of hydrogel and PDMS, creating a spherical cavity as small as 150 μm. The spherical cavity is embedded with pH-responsive hydrogel for on-demand drug delivery. The drug loaded in the hydrogel matrix is released into the ocular environment by diffusion. The spherical cavity with a narrow opening restricts the diffusion to a minimum under normal ocular pH conditions(pH > 6). When the ocular pH reduces (pH < 6), the pH-responsive hydrogel inside the spherical cavity deswell and accelerates the drug release.