GaN epilayers were grown on sapphire by metal-organic chemical vapor deposition (MOCVD), and the samples were annealed with rapid thermal processor (RTP) at 650, 750, 850 and 950oC, respectively. The effect of heat treatment on structural and optoelectronic properties of GaN epilayers was investigated. X-ray diffraction (XRD) analysis shows that the full width at half maximum (FWHM) of the rocking curves becomes smaller as the annealing temperature increases. Photoluminescence (PL) spectra at room temperature demonstrate that the yellow band decreases with the increase of annealing temperature. Hall-effect measurements reveal that carrier concentration of the GaN epilayers raise with the increase of annealing temperature. The results suggest that the structural and optoelectronic properties of GaN epilayers could be significantly improved by heat treatment.