We develop an adaptive optics (AO) multiphoton microscopeby incorporating a deformable mirror and a Hartmann-Shackwavefront sensor. The AO module operating in closed-loop is used tocorrect for the aberrations of the illumination laser beam. This increasesthe efficiency of the nonlinear processes in reducing tissue photodamage,improves contrast, and enhances lateral resolution in images ofnonstained ocular tissues. In particular, the use of AO in the multiphotonmicroscope provides a better visualization of ocular structures,which are relevant in ophthalmology. This instrument might be useful toexplore the possible connections between changes in ocular structuresand the associated pathologies.