The residual stress level of key components in Computer Numerical Control (CNC) machine tools affects the accuracy retention rate of the machine tool. At present, most research on residual stress in machine tools only measures the magnitude of residual stress in key components and the effectiveness of residual stress relief. There is a lack of evaluation methods for residual stress levels in key components of CNC machine tools, and parameters related to thermal aging processes in enterprises are limited in empirical cognition. Therefore, in order to effectively eliminate residual stress, creep simulation and finite element analysis are used to analyze the stress distribution of key components, and the thermal aging process is optimized based on finite element simulation. The experimental results showed that the maximum creep deformation of the bed was 16.5 x 10- 4mm, while the maximum creep deformation of the column and spindle box were 11.3 x 10- 5mm and 2.8 x 10- 5mm, respectively, which were smaller than the creep deformation of the bed. After the fine machining process was completed, the maximum principal stresses on the upper guide rail installation surface of Group A and Group B were 5.8 MPa and 17.5 MPa, respectively, and the maximum principal stresses on the installation surface of the lower guide rails were 20.5 MPa and 65.7 MPa, respectively. The maximum principal stresses on the installation surface of the left guide rail were 33.0 MPa and 56.5 MPa, respectively, while the maximum principal stresses on the installation surface of the right guide rail were 18.2 MPa and 49.5 MPa, respectively. After the precision machining process was completed, the maximum principal stresses on the left guide rail installation surface of Group A and Group B columns were - 8.4 MPa and 34.6 MPa, respectively, and the maximum principal stresses on the right guide rail installation surface were - 7.1 MPa and 5.1 MPa, respectively. After the precision machining of the spindle box was completed, the maximum principal stresses on the installation surface of the left guide rail were - 8.3 MPa and - 15.9 MPa, respectively. The maximum principal stresses on the installation surface of the right guide rail were - 23.5 MPa and - 24.3 MPa, respectively.