Five-axis flank milling is the most commonly used processing method in the aviation industry for the machining of thin-walled parts with complex ruled surfaces. During machining, the tool/workpiece deformations caused by the cutting force often lead to surface errors on the machined components that severely affect the accuracy of the machining results. This article presents an iterative compensation strategy to reduce the tool/workpiece deformation-induced surface error during the five-axis flank milling of thin-walled workpieces by modifying the tool tip position and tool axis orientation. This approach can be implemented in four steps. First, a highly integrated cutter-workpiece engagement extraction method is developed for the construction of a flexible cutting force model that can follow changes in the process geometry. Second, the tool/workpiece deformations are predicted by the cantilever beam model and finite element model, respectively. Third, an off-line error compensation scheme is performed at each cutting location of the tool path to obtain the modified tool position. Fourth, the machined surface of the workpiece model is reconstructed, and the compensated machining code, which can be used directly for actual machining, is generated. A case study is presented at the end of this article, and the effectiveness of the present compensation strategy is verified by machining experiments.