Temporal profile distortions reduce excitation efficiency and image quality in temporal focusing-based multiphoton microscopy. In order to compensate the distortions, a wavefront sensorless adaptive optics system (AOS) was integrated into the microscope. The feedback control signal of the AOS was acquired from local image intensity maximization via a hill-climbing algorithm. The control signal was then utilized to drive a deformable mirror in such a way as to eliminate the distortions. With the AOS correction, not only is the axial excitation symmetrically refocused, but the axial resolution with full two-photon excited fluorescence (TPEF) intensity is also maintained. Hence, the contrast of the TPEF image of a R6G-doped PMMA thin film is enhanced along with a 3.7-fold increase in intensity. Furthermore, the TPEF image quality of 1μm fluorescent beads sealed in agarose gel at different depths is improved.