X-ray photoelectron diffraction (XPD) in combination with hard X-ray photoelectron spectroscopy (HAXPES) has been used to study the structure of buried layers in thin multilayer films. A detailed layer-by-layer investigation was performed using the element-specific, local-probe character of XPD. In the present work, angular-resolved HAXPES at a photon energy of 7.94 keV photon energy was used to investigate a Cr/Mn62Ga38/Mg/MgO multilayer system. Differences in the angular distributions of electrons emitted from Mn and Ga atoms revealed that the structure of Mn62Ga38 changes from L10 towards D022 for increasing annealing temperatures. A c/a ratio of 1.81 ± 0.06 was determined for the buried Mn62Ga38 layer in a D022 structure from the XPD experiment. The improvement of the structural order of the Mn62Ga38 layer is accompanied by an improvement of the structure of the overlying MgO layer.