A new optical structure in a dual-frequency laser interferometer for measuring lead screws in diffraction grating ruling engines is proposed, and a formula which can quickly correct the Abbe error is deduced in this paper. In the process of testing lead screws, because the Abbe error in the measured data can be compensated in real time, the measurement system which doesn't meet Abbe principle can achieve high measurment accuracy. In addition, by adjusting the reference angle of the conical prisms, this method can also eliminate the measurement error induced by the axial movement of a lead screw in measuring process. The experimental result shows that the maximum residual error is only 0.48 m within a 300 mm stroke after the maximum Abbe error of 1.39 m is corrected. In conclusion, this method effectively improves the measurement accuracy of lead screws.