Currently, in the aircraft design, thinner structures are required to reduce weight, which in turn presents challenges for the manufacturing of parts and components. One of the identified problems in manufacturing is the machining distortion phenomenon, which causes the generation of scrap during the production of mechanical and structural components. This study presents the use of a finite element procedure, artificial neural network models, and the simulated annealing algorithm to optimize machining distortion phenomena in aluminum-based structures. A finite element procedure that simulates machining distortion by considering residual stresses and machining locations is used to generate training and validation data sets for the construction of an artificial neural network model. Once the performance of the artificial neural network is validated, simulated annealing is used in combination with the neural network model to find the optimum parameters of the machining locations and the residual stresses conditions that reduce distortion phenomena caused by machining. A case study of a specimen that has complex geometrical features, such as those that present in the design of aircraft structures, was used for the validation of the models. The results show that the proposed approach predicts the machining distortion of the specimen obtaining errors below 3% regarding experimental observations. Numerical results not only predict maximum distortions, but the evidence shows that the finite element can estimate the distribution of the distortion presented experimentally in the case study. Additionally, the optimization results helped to reduce the distortions 80% or more for high levels of deformation. Therefore, the proposed method in this study helps in the prediction and optimization of machining distortion of aluminum-based structures.