Freeform optics are widely used in many fields with its excellent optical performances. Fast tool servo (FTS) diamond turning technology are considered to be very promising technique for freeform surface fabrication. However, some elements may influence the machining accuracy, such as the spindle speed drift, periodical change cutting force, and diamond turning machine (DTM) motion errors. In this paper, an in situ measurement method and an error compensation machining technique are proposed to improve FTS technique machining accuracy. The machined surface profile data is obtained by a linear variable differential transformer (LVDT) and the error compensation machine is implemented by a two degree of freedom (DOF) FTS. The experiment results show that the form error is dropped by 20 % and surface roughness of 18.1 %. This technology is easy to take out that contributes to the application of high precision freeform surfaces in aerospace, military, biochemical medical, communication, and many other fields.