To avoid repetitive position error between the machining and the detection, an on-machine verification (OMV) system for complex spatial profile is researched.By applying touch trigger probe system to five-axis machining center and analyzing the corresponding kinematic model of OMV system, the post process program has been made out.In consideration of the efficiency and effectiveness of the algorithm, the traditional traveling salesman problem is treated as an optimal matching problem for partial quick solution, and an overall optimal measurement path can be achieved subsequently.Meanwhile, a method is proposed to check the interference during the detection, and means of graphics intersection is adopted to avoid incorrect collisions in advance.An OMV process of surface on “S” specimen has been implemented and the obtained deviation is compared with another set of data measured on a coordinate measuring machine.It is found that the former reduces the coefficient of variation by 7.3% relative to the latter under the overall consistency condition.