The annealing process of magnesium-doped gallium nitride (GaN:Mg) epilayers grown by metal-organic vapor-phase epitaxy was investigated by in situ measurements of electrical transport properties. The resistivity ρ and the Hall effect were studied as functions of time and temperature in the range of 20–600 °C. A time-dependent p-type conductivity was observed at temperatures as low as 350 °C. Activation energy of about Eact=1.5 eV was found for the magnesium acceptor (Mg) from the isothermal measurements of ρ(t) kinetics in the range of 350–550 °C. This value corresponds well to the theoretical prediction for the thermal dissociation of magnesium-hydrogen complexes (Mg–H). The annealing at temperatures higher than 600 °C leads obviously to the activation of Mg acceptors, but the final resistivity of the sample is higher than the result obtained after annealing at 520 °C. The ionization energy of electrically active Mg acceptor level of about EA=170 meV was found from the temperature dependences of the resistivity ρ(T).