This paper proposes a servo-tuning system for five-axis machine tools using a virtual feed drive system. The feed drive systems were first modeled to include the influence of friction and backlash. The particle swarm optimization (PSO) algorithm was adopted to identify and estimate the optimal system parameters. Therefore, the virtual system can be used to comprehend the influence of servo parameters on machining performance. The proposed approach was verified using the QC20-W wireless ballbar to measure the results of the circular test. The experimental results indicate that our proposed approach can improve the rounding error by 21% and mismatch between the feed axes by 16%. In addition, based on parameter variations, such as variations in bandwidth, resonance frequency, and contour error, we propose methods to diagnose online contouring errors.