Photonic generation of a phase-coded microwave waveform with ultrawide frequency tunable range using two polarization modulators (PolMs) is proposed and experimentally demonstrated. The first PolM (PolM1) is used to control the polarization direction of a linearly polarized light wave to have an angle of 45° or 135 ° relative to one principal axis of the second PolM (PolM2). PolM2 operates in conjunction with a polarization controller and a polarizer as an equivalent Mach-Zehnder modulator (MZM). Depending on the polarization direction of the incident light wave, the equivalent MZM is biased at the opposite slopes of the transfer function. Thus, by applying a binary coding signal with a switching voltage of Vπ to PolM1, a π phase-coded microwave waveform is generated. The key significance of the technique is that a phase-coded microwave waveform with an ultrawide frequency tunable range can be generated. The technique is experimentally evaluated. The generation of a frequency-tunable phase-coded microwave waveform with a frequency at 10, 20, 30, and 40 GHz is demonstrated.