In this paper, an all-fiber laser feedback interferometer (LFI) with a diffraction grating was developed for sequential measurement of in-plane and out-of-plane displacements without changing the optical arrangement. When the light emitted from an erbium-doped fiber ring laser is incident on a reflection grating at the Littrow angle, the diffracted light will return into the laser cavity along the original path, thus generating laser feedback interference. Experimental results reveal that the all-fiber system could achieve a precision of 40 nm in both in-plane and out-of-plane displacements sensing. Compared with the traditional all-fiber LFI, the proposed sensing system transfers the measuring scale from laser wavelength to grating period, and it has the advantages of good anti-interference performance and reliability.