Since the demonstration of p-type gallium nitride (GaN) through doping with substitutional magnesium (Mg) atoms1,2, rapid and comprehensive developments, such as blue light-emitting diodes, have considerably shaped our modern lives and contributed to a more carbon-neutral society3–5. However, the details of the interplay between GaN and Mg have remained largely unknown6–11. Here we observe that Mg-intercalated GaN superlattices can form spontaneously by annealing a metallic Mg film on GaN at atmospheric pressure. To our knowledge, this marks the first instance of a two-dimensional metal intercalated into a bulk semiconductor, with each Mg monolayer being intricately inserted between several monolayers of hexagonal GaN. Characterized as an interstitial intercalation, this process induces substantial uniaxial compressive strain perpendicular to the interstitial layers. Consequently, the GaN layers in the Mg-intercalated GaN superlattices exhibit an exceptional elastic strain exceeding −10% (equivalent to a stress of more than 20 GPa), among the highest recorded for thin-film materials12. The strain alters the electronic band structure and greatly enhances hole transport along the compression direction. Furthermore, the Mg sheets induce a unique periodic transition in GaN polarity, generating polarization-field-induced net charges. These characteristics offer fresh insights into semiconductor doping and conductivity enhancement, as well as into elastic strain engineering of nanomaterials and metal–semiconductor superlattices13.