The invention relates to an optical generation device and method for a phase coding signal with a tunable multiplication factor. The device comprises a laser, a DP-QPSK modulator, a microwave signal generator, an electric amplifier, a coding signal generator, a direct current power, a polarization controller, a polarizer, an optical amplifier, and a photo detector. The method comprises the step ofgenerating binary phase coding signals with different multiplication factors according to needs by using a non-linear modulation characteristic of the DP-QPSK modulator, wherein the multiplication factors can be any one of one to four, and the frequencies of the generated signals are tuned by adjusting the frequency of an input microwave signal. The device is based on an integrated modulator structure, has a simple system, has stable performance, overcomes defects that a traditional manner of generating a pulse compression signal in the frequency domain is limited by the rate and bandwidth ofan electronic device, has difficulty in generating a high-frequency signal or cannot generate the high-frequency signal and the generated signal cannot be tuned flexibly in frequency, greatly improves the frequency of generating the phase coding signal, and can produce phase coding signals with very large frequency tuning range.