In this study, a novel moiré fringe analysis technique is proposed for measuring the surface profile of an object. After applying a relative displacement between two gratings at a constant velocity, every pixel of CMOS camera can capture a heterodyne moiré signal. The precise phase distribution of the moiré fringes can be extracted using a one-dimensional fast Fourier transform (FFT) analysis on every pixel, simultaneously filtering the harmonic noise of the moiré fringes. Finally, the surface profile of the tested objected can be generated by substituting the phase distribution into the relevant equation. The findings demonstrate the feasibility of this measuring method, and the measurement error was approximately 4.3 μm. The proposed method exhibits the merits of the Talbot effect, projection moiré method, FFT analysis, and heterodyne interferometry.