This paper reports the effects of GaN and AlN nucleation layers (NLs) on the characteristics of the subsequently grown AlGaN templates, which were grown by a two-step growth method on sapphire substrates using metal-organic chemical vapor deposition. The in situ monitored reflectance spectra reveal that the thickness variation in AlGaN templates grown on the GaN NL is much smaller than that on the AlN NL. X-ray diffraction patterns show that the AlGaN template with a GaN NL exhibits a better crystalline quality as compared to that with an AlN NL. Observed from the transmission electron microscopy, it is also shown that the dislocation density of the AlGaN template with a GaN NL can be substantially reduced. In addition, the fabricated light-emitting diodes from the AlGaN template with a GaN NL exhibit a lower forward voltage, a lower series resistance, a lower leakage current, and a narrower linewidth of electroluminescence peak than those with the AlN NL.