Changes in electrical as well as surface composition such as chemical and electronic properties of Mg-doped p-type GaN by phosphorus implanting are systematically investigated using Hall effect and X-ray photoelectron spectroscopy (XPS) measurements. It is shown that p-type conductivity of Mg-doped GaN can be improved by implanting P atoms after a proper post-implantation annealing treatment, probably due to the reduction of self-compensation by P atoms substitution on N vacancy sites. XPS analysis is further found that the decrease of surface oxides and the shift of the surface Fermi level toward the valence band edge through P atoms introduced. These experimental results indicate that the P implantation is an effective method to improve p-type conductivity of Mg-doped GaN and reducing the surface barrier height, which can lead to a lower metal contact resistivity to p-type GaN.