The invention relates to a distance-measuring method and a device for an optical fiber, which comprises a wavelength-scanning light source (1), fiber-optical couplers (2, 2', 2''), fiber-optical gratings (3, 3'), a fiber-optical collimating device (4), a surface of an object for measuring (5), light-sensitive detectors ( 6, 6'), an A / D convertor (7) and a computer (8). Outlet light of the wavelength-scanning light source is separated to two paths through the fiber-optical couplers, one light path enters into the two fiber-optical gratings whose central wave length are different, reflected light of the fiber-optical gratings are detected by the light-sensitive detectors, the other path which enters into the fiber-optical collimating device is partially reflected by the end surface portion of the collimating device, the reflected light is partially reflected return to the fiber-optical collimating device by the surface of the object for measuring, two beams of the reflected light are detected by the light-sensitive detectors after being interfered. Output signal of the light-sensitive detectors is input into the computer through the A / D convertor, an distance between the end surface of the fiber-optical collimating device and the surface of an object for measuring is calculated through fourier transform white light interferometric phase demodulation method.