To improve performance of AlGaN-based ultraviolet light-emitting diodes (UV-LEDs), an LED with a special trapezoidal electron blocking layer (EBL) is investigated numerically. The results show the optimized structure has better photoelectric performance than conventional structure. The light output power of the new structure was enhanced by a factor of 26% compared with the reference conventional LED. The reasons for these improvements are that the special trapezoidal EBL can increase the hole injection efficiency and suppress electron overflow, thus enhancing the radiative recombination rate. Consequently the light output power and the internal quantum efficiency are improved.