The invention discloses a dual-optical-frequency-comb linear spectral encoding imaging method. According to the method, two optical frequency combs with locked repetition frequencies are used, and thetwo optical frequency combs output signal light and local oscillator light respectively. The signal light is divided into detection light and reference light. The detection light passes a spectral encoder to be focused on the surface of a sample to be measured, the sample to be measured is encoded, and then the sample to be measured and the local oscillator light are subjected to dual-optical-frequency-comb heterodyne interference. The reference light directly interferes with the local oscillator light. Two interference pulse signals are generated and are converted into digital signals by signal acquisition. Optical reference compensation detection jitter is used, and a sample absolute distance with high precision and high stability, a linear reflectivity and phase information are obtained. The sample is moved linearly, continuous measurement is performed, and a 3D topographic image and a 2D reflectance image with high precision are achieved. The dual-optical-frequency-comb linear spectral encoding imaging has the advantages of simple structure, high measurement speed, high precision, a large amount of information and high expansion.