In this work, we propose a novel approach to reduce the ionization energy of acceptors in GaN through Zn–Mg codoping. The characteristics of the defect states and the valence-band maximum (VBM) were investigated via first-principles calculation. Our results indicated that the original VBM of the host GaN could be altered by Zn–Mg codoping, thus improving the p-type dopability. We show that the calculated ionization energy ε(0/-) of the Zn–Mg acceptor is only 117 meV, which is about 90 meV shallower than that of the isolated Mg acceptor.