The optical properties of heavily Mg-doped GaN activated at low temperature in O 2 /N 2 mixtures were investigated using room-temperature photoluminescence (PL), excitation density-dependent PL and temperature-dependent PL. It was found that the emission intensity of Mg-doped GaN was dramatically enhanced after samples were annealed in N 2 and O 2 mixed gas. In particular, when a sample was annealed in a mixture of gases of 10% O 2 + 90% N 2 , it displayed a very strong emission intensity, about 10 times stronger than that of an as-grown sample; however, the intensity of Mg-doped GaN decreases again on further increasing the ratio of oxygen in the annealing atmosphere. According to the result of excitation density-dependent PL, a simple model of the mechanism of enhanced emission intensity of Mg-doped GaN annealed in O 2 and N 2 is proposed.