A compact measurement system to measure four-degree-of-freedom (4-DOF) geometric errors of machine tools is presented in this paper. The angular errors and the straightness errors of the machine tools can be detected simultaneously by only one single laser beam, one position-sensitive detector (PSD) and one four-quadrant photodetector (QPD) through a simple optical configuration. The 4-DOF system has been calibrated and an API XD laser system is used as a reference. The straightness and angular measurement range of the system are ± 100 μm and ± 200 arc-sec, respectively. The resolution of straightness and angle measurement is 0.1 μm and 0.5 arc-sec, respectively. The developed measurement system was assembled on a machine tool with a carrier platform which has been moved 800 mm with an interval of 50 mm. A similar measurement was also conducted by the API XD laser system. The measuring results show that the maximum straightness residual is less than 2 μm and the maximum angular residual is less than 2 arc-sec. The experimental results show that the system have a straightness repeatability of ± 2 μm and an angular repeatability of ± 2 arc-sec. The developed 4-DOF measurement system can be easily assembled for geometric error measurement of machine tools in the industrial fields.