The frequency drift of laser greatly affects the positioning accuracy of the phasesensitive optical timedomain reflectometer (ΦOTDR) distributed optical fiber disturbance sensing system. So a new localization algorithm based on spectrum analysis was proposed to replace the traditional timedomain moving difference and average algorithm. The collected scattering curve data was taken as the Fourier transform, and then the characteristic frequency interval was selected to calculate the location result, which can effectively suppress the positioning error caused by the laser frequency drift. In addition, a prototype of 8km was built to test the positioning algorithm. Test results indicate that the signaltonoise ratio of the final system is improved, and the effectiveness of the algorithm is verified.