A study on the effect of Mg doping in quantum-well (QW) layers on dual-wavelength light-emitting diodes (LEDs) was performed. A series of dual-wavelength LEDs with different Mg doping conditions were fabricated. According to electroluminescence measurement, as the Mg doping concentration and regions varied, improved hole distribution and bottom-QW emission was achieved. This result is in accord with APSYS simulation. In addition, the sample with Mg doping in all QWs showed the highest output power and smallest efficiency droop. It is concluded that Mg doping in QWs could ameliorate the optical and electrical properties of dual-wavelength LEDs.