In this article, a photonic microwave signals generation scheme for background-free phase-coded (PC) radar pulse with multioctave tuning is experimentally demonstrated. Firstly, an optical frequency comb (OFC) demultiplexing technology based on optical injection locking (OIL) provides a power-equalized coherent optical local oscillator (LO) with ultra-broadband tuning capability. Then, a phase-modulated optical signal is produced based on the conversion intensity modulation to phase modulation. Finally, a background-free phase-coded signal can be obtained by beating the optical signal with LO at a balanced photodetector (BPD). The proposed scheme features a flat frequency response over an ultra-wideband frequency range without needing a broadband modulator and radio frequency (RF) synthesizer. A proof-of-concept experiment demonstrates that the power fluctuation of 0.5 Gbps background-free PC pulses is lower than 3.12 dB within 3∼24 GHz carrier frequency. Furthermore, the pulse compression performance and system stability are investigated, respectively.