Two-photon microscopy has become an indispensable tool in biological research allowing imaging of intracellular structures especially deep in tissue. Due to its capability of three-dimensional (3D) fabrication in lithography, two-photon excitation is also an essential tool for nanofabrication. However, both two-photon microscopy and two-photon lithography suffer from aberrations that are introduced by spatial variations in the refractive index of the specimen, leading to compromised image and structure quality. Specimen- induced aberrations can be compensated by adaptive optics. In this thesis, I propose a new correction scheme for two-photon microscopy and two-photon lithography adaptive optics, namely poke mode aberration correction. This new scheme simplifies the communication between the wavefront sensor and the deformable mirror, therefore eliminating the need for multiple conversions and in turn the potential to minimize the amount of error introduced during analysis. Using this new control system, we demonstrate that test aberrations can be reliably compensated using the developed feedback loop. In addition, aberrations induced by biological tissue, e.g. a 50 m and 85 m thick section of fixed mouse brain tissue, can be corrected leading to enhanced resolution and image quality. Furthermore, preliminary two-photon lithography fabricated structures illustrate the potential of smoother structure surfaces when aberration correction is conducted with the new control system.