Electron leakage has an adverse influence on the optical output power for laser diodes (LDs), especially where the conventional last quantum barrier (LQB) in the multiple quantum well (MQW) active region may cause severe leakage problems. In this article, a composite last quantum barrier (CLQB) composed of p-type doped AlGaN (p-AlGaN) and unintentionally doped GaN (u-GaN) layers is designed to replace the conventional one, for overcoming the problem of electron overflow. Theoretical calculations with LASTIP software demonstrate that CLQB with optimized parameters of Al composition, thickness and p-type doping concentration of the p-AlGaN layer in the CLQB can have a 50% improvement in slope efficiency (SE) compared with the conventional structure LD. This will help to realize a higher optical output power in InGaN-based violet LDs.