The invention relates to a distributed optical fiber sensing system, and particularly relates to a BOCDA (Brillouin Optical Correlation Domain Analysis) distributed optical fiber sensing device and amethod based on physical random code modulation, so as to solve the problems of a limited sensing distance and spatial resolution deterioration existing in the existing BOCDA distributed optical fibersensing system. The device comprises a distributed feedback semiconductor laser, an electro-optic phase modulator, a physical random code generator, a first optical isolator, a 1*2 optical fiber coupler, a high-speed electro-optic modulator, a microwave signal source, a variable optical delay line, a first optical amplifier, an optical polarization scrambler, a second optical isolator, a sensingoptical fiber, a second optical amplifier, an optical circulator, a tunable optical filter and a optical power detector. In comparison with a time domain system, the spatial resolution is higher, thesensing distance is longer, the problem of spatial resolution deterioration caused by existence of a weak period of chaotic laser signals is avoided, adjustment on the high spatial resolution acquisition is extremely convenient, and the signal-to-noise ratio of the sensing system is effectively improved.