The work is devoted to the study of p-GaN: Mg epitaxial layers grown by the ammonia MBE technique. We find that the conductivity of GaN layers doped with Mg does not change with a postgrowth heat treatment. Formation of Mg3N2 nanocrystallites on GaN surface during epitaxial growth of the GaN layer with a high magnesium doping level was detected by the RHEED technique for the first time. It was shown that the Mg3N2 nanocrystallites formation competes with the acceptor states formation process. It has been proposed that the growth temperature can be applied as an additional “tuning” mechanism which affects the Mg incorporation into the growing GaN:Mg layers.