We report microstructural characterization of heavily Ga-doped ZnO (GZO) thin films on GaN and sapphire by aberration-corrected scanning transmission electron microscopy. Growth under oxygen-rich and metal-rich growth conditions leads to changes in the GZO polarity and different extended defects. For GZO layers on sapphire, the primary extended defects are voids, inversion domain boundaries, and low-angle grain boundaries. Ga doping of ZnO grown under metal-rich conditions causes a switch from pure oxygen polarity to mixed oxygen and zinc polarity in small domains. Electron energy loss spectroscopy and energy dispersive spectroscopy spectrum imaging show that Ga is homogeneous, but other residual impurities tend to accumulate at the GZO surface and at extended defects. GZO grown on GaN on c-plane sapphire has Zn polarity and no voids. There are misfit dislocations at the interfaces between GZO and an undoped ZnO buffer layer and at the buffer/GaN interface. Low-angle grain boundaries are the only threading microstructural defects. The potential effects of different extended defects and impurity distributions on free carrier scattering are discussed. V C 2012 American Institute of Physics. [http://dx