A grating interferometer based on the wavelength-modulated phase-shifting method for displacement measurements is proposed. A laser beam with sequential phase shifting can be accomplished using a wavelength-modulated light passing through an unequal-path-length optical configuration. The optical phase of the moving grating is measured by the wavelength-modulated phase-shifting technique and the proposed timedomain quadrature detection method. The displacement of the grating is determined by the grating interferometry theorem with the measured phase variation. Experimental results reveal that the proposed method can detect a displacement up to a large distance of 1 mm and displacement variation down to the nanometer range.