We propose a new valence control method, the “codoping method (using both n- and p-type dopants at the same time)”, for the fabrication of low-resistivity p-type GaN crystals based on the ab-initio electronic band structure calculations. We have clarified that while doping of acceptor dopants, BeGa and MgGa, leads to destabilization of the ionic charge distributions in p-type GaN crystals, doping of Sica or ON give rise to p-type doped GaN with high doping levels due to a large decrease in the Madelung energy. The codoping of the n- and p-type dopants (the ratio of their concentrations is 1:2) leads to stabilization of the ionic charge distribution inp-type GaN crystals due to a decrease in the Madelung energy, to result in an increase in the net carrier densities.