Crack-free GaN epitaxial layer was obtained through inserting 80 nm graded AlGaN buffer layer between GaN epilayer and high temperature AlN buffer on 2-in Si(111) substrates by metal organic chemical vapor deposition. This paper investigated the influence of AlGaN buffer thickness on the structural properties of the GaN epilayer. It was confirmed from the optical microscopy and scanning electronic microscopy that the graded AlGaN buffer with optimized thickness had a remarkable effect on introducing relative compressive strain to the top GaN layer and preventing the formation of cracks. X-ray diffraction and atomic force microscopy analysis showed that AlGaN buffer with proper thickness could improve the crystal quality and surface morphology of the GaN film. Transmission electron microscopy analysis revealed that a significant reduction in threading dislocations was achieved in GaN epilayer by the insertion of graded AlGaN buffer.