This paper presents a new method of automatic detection and elimination of local interference methodology for five-axis complex surface machining with a flat-end milling cutter based on the technique of curvature matching and square grid points. A diameter of milling cutter was chosen by curvature matching to ensure interference-free at the point where the cutter and part contact. In odder to detect if rear interference occurs at the adjacent domain of contact point, the square grid points were employed to quickly build checking area and checking points. A technology of automatically generating square grid points and the method of detection and avoidance of local interference were also presented in this paper. Finally, the proposed methodology and algorithms were tested and verified by an example of NURBS surface.