In this research, a novel heterodyne laser encoder for 6-DOF displacement and angle measurements is proposed. The technique combines the advantages of heterodyne interferometry, grating shearing interferometry, and Michelson interferometry. When a heterodyne light beam with two orthogonally polarized directions is used to focus on a semi-transmission grating, two detection configurations for in-plane and out-of-plane will be obtained. By means of measuring the phase variations of the interfering signals from the moving grating, the in-plane displacement can be acquired. Besides, the out-of-plane displacement can be obtained by detecting the optical path difference between the reference beam and the reflection beam. Furthermore, 6-DOF displacement and angle information can be measured simultaneously by using the beam dividing method. According to the experimental results, the measurement resolution is about 2 nm. The experimental results show that our proposed method has the ability to measure 6-DOF displacement and angle information with high system stability. Comparing with other commercial measurement instructions, this laser encoder has the advantages of high resolution, high stability, and high flexibility.