In order to solve the problem of nonlinear error for a dual rotary table five-axis CNC machine tool due to the linkage of rotary and translational axes, the simulation of motion nonlinear error compensation for a multi-axis linkage CNC machine tool is proposed. The adjacent points in the tool position file are selected as the tool position points for building the model, and then the nonlinear error model resolved by the harmonic function is established according to the error distribution in the classical post-processing. The nonlinear error between the two tool position points is quickly predicted by the analytical expression of this model, and the real-time error compensation of the intermediate interpolation points is realized. Finally, MALTLAB simulation analysis is performed on the tool position file of an impeller part machining to verify the effectiveness of the proposed algorithm. The experimental results show that it can be seen from the distribution curve of the nonlinear error that it is about 10% after compensation as before compensation, thus verifying the effectiveness of the nonlinear error compensation mechanism. The correctness of the nonlinear error analysis and compensation method and the effectiveness of post-processing are verified.