Thin-walled aerospace parts have the characteristics of large size, thin wall thickness and complex shape, etc. In the process of machining, poor rigidity and high material removal rate are easy to cause machining deformation due to uneven distribution of residual stress, and conventional detection methods and regulation means can not meet the needs of on-site production. In order to solve these problems, an effective method of ultrasonic nondestructive in-situ stress detection and ultrasonic stress regulation is proposed in this paper. Firstly, the ultrasonic residual stress detection and ultrasonic stress regulation are analyzed theoretically, and their working principles are explained, which provides a theoretical basis for the subsequent use of the equipment. Then, according to the deformable sections of large thin-walled parts in the production site, the typical characteristics are extracted to complete the design of the experimental part, and the residual stress detection and regulation of the whole machining process are studied. Finally, through two groups of comparison experiments, the changes of residual stress values in different depth ranges of parts and the changes of the flatness of the final parts are analyzed. The results show that the ultrasonic critical refraction longitudinal wave (LCR wave) method can be used to detect the residual stress of thin-walled parts in different depth ranges, and the ultrasonic stress regulation method can reduce and homogenize the stress of thin-walled parts, and the machining deformation and conformal ability of the parts are significantly improved after the stress regulation.