The 170 GHz gyrotron presented in this article has an operating voltage of 75 kV and a beam current up to 45 A, which requires the cathode emission temperature to reach above 1000°C. At such a high temperature, it is bound to cause the cathode of the electron gun to undergo thermal expansion and generate a certain amount of deformation, which may cause a large change in the performance parameters of the electron gun. This article uses thermal analysis simulation software ANSYS Workbench and COMSOL Multiphysics to perform thermal analysis processing on the electron gun. The thermal analysis results show that the temperature difference of the magnetron injection gun (MIG) cathode emission band is 4.6°C, and the total deformation is about 0.054 mm. The magnitude of the deformation is within an acceptable range and has little effect on the performance of the MIG. Comparing the thermal analysis results obtained by the two software, the simulation results agree well.