Optical microscopes achieve diffraction-limited performance only when imaging through the immersion medium for which they are designed – usually water in the case of in vivo imaging. However, nearly all biological specimens larger than a single cell are rife with refractive index inhomogeneities. As a result, many biologists do not approach the level of spatial resolution in their images that they might assume. Similar problems, confronted by astronomers when imaging through Earth’s turbulent atmosphere, have long been addressed by using adaptive optics. Motivated by their success, Na Ji and I have developed an approach for adaptive optics suited to the constraints of biological microscopy. Using the approach, we can recover near-diffraction-limited performance in a variety of specimens, including those exhibiting large amplitude and/or spatially complex aberrations.