Two-photon (2P) microscopy is widely used in neuroscience, but the optical properties of brain tissue are poorly understood. We have investigated the effect of brain tissue on the 2P point spread function (PSF₂p) by imaging fluorescent beads through living cortical slices. By combining this with measurements of the mean free path of the excitation light, adaptive optics and vector-based modeling that includes phase modulation and scattering, we show that tissue-induced wavefront distortions are the main determinant of enlargement and distortion of the PSF₂p at intermediate imaging depths. Furthermore, they generate surrounding lobes that contain more than half of the 2P excitation. These effects reduce the resolution of fine structures and contrast and they, together with scattering, limit 2P excitation. Our results disentangle the contributions of scattering and wavefront distortion in shaping the cortical PSF₂p, thereby providing a basis for improved 2P microscopy.