Significance: To expand our understanding of the roles of astrocytes in neural circuits, there is a need to develop optical tools tailored specifically to capture their complex spatiotemporal Ca2+ dynamics. This interest is not limited to 2D, but to multiple depths. Aim: The focus of our work was to design and evaluate the optical performance of an enhanced version of a two-photon (2P) microscope with the addition of a deformable mirror (DM)-based axial scanning system for live mammalian brain imaging. Approach: We used a DM to manipulate the beam wavefront by applying different defocus terms to cause a controlled axial shift of the image plane. The optical design and performance were evaluated by an analysis of the optical model, followed by an experimental characterization of the implemented instrument. Results: Key questions related to this instrument were addressed, including impact of the DM curvature change on vignetting, field of view size, image plane flatness, wavefront error, and point spread function. The instrument was used for imaging several neurobiological samples at different depths, including fixed brain slices and in vivo mouse cerebral cortex. Conclusions: Our implemented instrument was capable of recording z -stacks of 53 μm in depth with a fine step size, parameters that make it useful for astrocyte biology research. Future work includes adaptive optics and intensity normalization.