In practical application, it is necessary to preserve the superconducting properties, including the critical temperature (Tc) of MgB2 in the form of tapes and wires that bond to a metallic substrate with a buffer layer. In this work, we investigate the relationship between the Tc and local structure of MgB2 films on ZnO buffered-Hastelloy substrate with various thicknesses using X-ray absorption fine structure. X-ray absorption near edge structure spectra reveal fluctuation of the boron σ-band near the Fermi level indicating an existence of lattice distortion inside the MgB2 films. Variations in the bond lengths of Mg–B and Mg–Mg from the extended X-ray absorption fine structure prove that the distortion in the MgB2 lattice is owing to the ZnO buffer layer. Besides the bond length, the Mg–B bond ordering was found to significantly affect the Tc behavior, which was attributed to the inter-plane strain caused by the ZnO buffer layer. Understanding the effect of the ZnO buffer layer on the local structure of MgB2 may help in determining the optimal conditions for enhancing the superconducting properties of MgB2 for power applications.