The authors report on variable-focus liquid microlenses self-adaptive to environmental p H. The microlens is formed via a water-oil interface stably pinned at a hydrophobic-hydrophilic contact line along an aperture in a flexible slip. A set of hydrogel microposts is photopatterned in a microfluidic chamber around the aperture; the microposts autonomously respond to the environmental p H variation by expanding or contracting, thus deforming the aperture slip and tuning the curvature of the water-oil interface and the focal length of the microlens. A single microlens has a tunable focal length from -7.6  mm to -∞ (divergent) and from 8.5  mm to +∞ (convergent).