The effect of a trimethylgallium (TMGa) preflow on the structural and optical properties of MOCVD grown AlN layers on sapphire substrates is investigated. Secondary ion mass spectroscopy measurements were performed to investigate the incorporation of Ga in the layers. It is shown that for AlN layers grown with a TMGa preflow Ga atoms incorporate mainly near the substrate/epilayer interface. Photoluminescence spectra exhibit a free exciton and a donor bound exciton. By analyzing the full width at half maximum of the free exciton and the defect luminescence an increased optical quality for the sample grown with TMGa preflow is demonstrated. Additionally, Raman spectroscopy reveals a higher crystal quality for this sample. Comparing the results from Raman spectroscopy and luminescence measurements a shift rate of 60 meV GPa−1 is determined for the free A-exciton. Finally, cross-sectional Raman spectroscopy is used to compare the strain at the AlN/sapphire interface for a sample grown with and without TMGa preflow.