The mechanisms of AlGaN device buffer layer growth were studied. Gallium residues in the reactor chamber may be harmful to the quality of the AlN strain modulation layer, which eventually worsens the AlGaN buffer layer. By restraining the gallium residues, the crystalline quality of the AlGaN layer is markedly improved. In addition, enhancing stress relief in nucleation and coalescence stages will reduce the edge dislocations induced by strain relaxation in the 2D growth stage. A slower precursor flow rate can promote the stress relief in nucleation and coalescence stages. By comparison, a suitable suppression of Al atoms’ surface migration can decrease surface roughness, which can be realized by increasing the precursor flow rate. Eventually, we obtained a AlGaN buffer layer having both low edge dislocation density and a flat surface using a two-step growth method.