A quasicommon-path heterodyne grating interferometer for displacement measurement is proposed. This measurement system includes a heterodyne light source, a moving grating, a few optical elements and a lock-in amplifier for phase measurement. The phase shift of the diffracted beams from grating is measured by the heterodyne technique. The grating displacement is determined by the relationship of the optical phase variation and grating pitch. The experimental results demonstrated the measurement resolution of 1 nm and the high system stability. Benefiting from the heterodyne interferometric phase measurement, this method has advantages of high measurement resolution, relatively straightforward operation.