High crystalline quality AlGaN films were grown on GaN templates by metalorganic chemical vapor deposition (MOCVD). Inhomogeneous distributions of Al compositions in both the vertical and lateral growth direction caused by the strong gas-phase pre-reaction occurring between Al precursors and NH3 were suppressed by optimizing the growth conditions. The residual strain in AlGaN/GaN induced by lattice mismatch, which results in the degradation of crystallinity, was modulated by varying thickness of a high temperature (HT) AlN interlayer (IL) inserted between AlGaN and GaN layers. Both the crystalline quality and Al-incorporation into the AlGaN are influenced by the residual strain related to the AlN IL thickness. Lastly, the understanding of the AlGaN growth and of the strain modification was employed to grow an AlGaN/GaN HEMT structure showing good electrical characteristics and uniformity.