Abstract It has been shown that the critical transition temperature (T c ) of MgB 2 superconducting materials decreases with the increase of hydrostatic pressure, but this is a comprehensive T c change after multiaxial strain, and the influence of strain on T c is not clearly understood. In this paper, based on the McMillan superconducting calculation formula and the first-principles density functional theory, the T c change of MgB 2 under uniaxial strain and the properties of MgB 2 such as energy band, Fermi surface, differential charge density and phonon dispersion spectrum under uniaxial strain are studied, and the relationship between uniaxial strain and these properties is analyzed. The calculated T c of MgB 2 at zero strain is 38.35 K, which is in good agreement with the experimental value of 39 K. When the a-axis strain is 1%, the T c value can be increased to 49.7 K, and there is a further improvement trend. When the a-axis compression strain is -1%, T c decreases to 31.52 K. When the c-axis tensioncompression strain is applied, the change of T c value is small. Further analysis shows that the influence of a-axis strain on the differential charge density, electronic band structure, phonon dispersion and other properties of MgB 2 is significantly greater than that of c-axis strain, and the influence of these properties on T c is discussed. The work in this paper has certain theoretical and guiding significance for the preparation of MgB 2 with higher T c and the study of the effect of uniaxial strain on T c of superconducting materials.