In this work, the InGaN/AlGaN multiple-quantum-well (MQW) near-ultraviolet (UV) light-emitting diodes (LEDs) with different aluminum compositions in the barrier layers are investigated and fabricated. The aluminum compositions of LED I, II, and III are 0, 2.5, and 3.85%, respectively. The light output powers of LED I, II, and III at an injection current of 350 mA are 95.46, 135.48 mW, and 179.54 mW, respectively. The light output power measured from LED III was 88% larger than that of LED I. The peak external quantum efficiency was enhanced from 9.24 to 17.26%. This result was attributed to the improvement of carrier confinement in the active region by using AlGaN-based barrier layers. The hot-cold effect of LEDs as functions of junction temperature currently is a very important key issue for actual application to LEDs. As the temperature increased, the injected carriers became excited and easily escaped from the active layer. Thus, the light output power of the LED decreased as the temperature increased. Compared with LED I and LED II, the light output power of LED III with better carrier confinement was decreased more slowly with increasing temperature.