The microscopic structural and optical characteristics of AlGaN light-emitting diodes (LEDs) fabricated on the AlN templates with dense macrosteps are shown to clarify the origin of their high internal quantum efficiency of radiation (IQE). The cross-sectional transmission electron microscopy observations under the high-angle annular dark field scanning mode and microscopic energy dispersive X-ray spectroscopy revealed that the AlGaN cladding layer under the AlGaN quantum well (QW) layer had a microscopic compositional modulation, which originates from the macrosteps at the AlN template surface. Moreover, Ga-rich portions in the cladding layer behaved as current micropaths, and the micropaths are connected with the carrier localization structure formed in QWs. The in-plane cathodoluminescence (CL) spectroscopy showed a significant inhomogeneity of the CL characteristics. The gentle slopes at the sample surface showed brighter emissions with a lower peak photon energy, confirming the carrier localization. This carrier localization structure in the QWs combined with the current micropaths in the cladding layer can increase the IQE as well as external quantum efficiency of the AlGaN LEDs.