The invention relates to a distributed optical fiber positioning system, in particular to an OTDR device and measurement method based on physical random code correlation detection, which solves the contradiction that the dynamic range and spatial resolution of the traditional OTDR system cannot be improved simultaneously. The device of the present invention includes a physical random code generator, a microwave amplifier, a DFB laser, an electro-optical phase modulator, an optical isolator, a first optical amplifier, a 1×2 fiber coupler, a variable optical delay line, a first photodetector, and an oscilloscope , an optical fiber to be tested, an optical circulator, a second optical amplifier, a second photodetector, and a computer. The system structure of the present invention is simple, easy to operate, low in cost, and the spatial resolution is determined by the code width of the physical random code, which not only avoids the problem of deterioration of the spatial resolution caused by the weak period of the chaotic laser signal, but also improves the accuracy of the high spatial resolution acquisition. Adjustment is also very convenient.