In the field of CNC machining, high-speed and high-precision machining has been regarded as the key research by many scholars. In conventional methods, high-speed machining and high-precision machining are contradictory. It is inevitable to reduce the feedrate to improve the processing accuracy. In the paper, a pre-compensation based on discrete inverse transfer function (PDIT) theory is proposed. PDIT is able to improve machining accuracy by reducing contour errors without decreasing feedrate. The proposed PDIT theory is divided into three parts, NURBS interpolator, feedrate scheduling, and interpolator with pre-compensation. The NURBS interpolator has greatly advantage to interpolate the parameter curve directly. Therefore, the paper adopts the NURBS interpolator to accomplish interpolation. In the feedrate scheduling, S-type flexible acceleration and deceleration are used for path planning, and the maximum starting feedrate is obtained with the feedrate constraint. In the interpolator with pre-compensation, the NURBS interpolator is pre-compensated by PDIT. For inputs, the response of transfer function reach steady-state response with a little time. Before reaching steady-state response, the unsteady response exists in the transfer function. The unsteady response usually sustains tens of interpolation periods and must be lead contour error in machining. Hence, the PDIT theory is employed to compensate the contour error causing by the unsteady response of transfer function to NURBS interpolator. The drive system is a transfer function, so the unsteady response of drive system cause machining errors before reaching the steady-state response. In the paper, the NURBS interpolator is pre-compensated by PDIT theory before the drive system to reduce contour errors and improve machining accuracy. Finally, the performance of the proposed PDIT is evaluated by simulation experiments. The experimental results illustrate that PDIT theory obviously improve the machining accuracy and reduces the contour error.