Radioactive $^{27}\mathrm{M}\mathrm{g}$ (${t}_{1/2}=9.5\text{ }\text{ }\mathrm{min}$) was implanted into GaN of different doping types at CERN's ISOLDE facility and its lattice site determined via ${\ensuremath{\beta}}^{\ensuremath{-}}$ emission channeling. Following implantations between room temperature and $800\text{ }\ifmmode^\circ\else\textdegree\fi{}\mathrm{C}$, the majority of $^{27}\mathrm{M}\mathrm{g}$ occupies the substitutional Ga sites; however, below $350\text{ }\ifmmode^\circ\else\textdegree\fi{}\mathrm{C}$ significant fractions were also found on interstitial positions $\ensuremath{\sim}0.6\text{ }\text{ }\AA{}$ from ideal octahedral sites. The interstitial fraction of Mg was correlated with the GaN doping character, being highest (up to 31%) in samples doped $p$ type with $2\ifmmode\times\else\texttimes\fi{}{10}^{19}\text{ }\text{ }{\mathrm{cm}}^{\ensuremath{-}3}$ stable Mg during epilayer growth, and lowest in Si-doped $n$-GaN, thus giving direct evidence for the amphoteric character of Mg. Implanting above $350\text{ }\ifmmode^\circ\else\textdegree\fi{}\mathrm{C}$ converts interstitial $^{27}\mathrm{M}\mathrm{g}$ to substitutional Ga sites, which allows estimating the activation energy for migration of interstitial Mg as between 1.3 and 2.0 eV.