The invention provides an electric/optical frequency hopping carrier generator based on a photon technology. The generator comprises a laser source, a first polarization controller, a polarization modulator, a digital control signal, a second polarization controller, an optical circulator, a polarization beam splitter, a third polarization controller, a first Mach-Zehnder modulator, a second Mach-Zehnder modulator, a microwave modulation signal, a microwave modulation signal, a polarization analyzer and a photoelectric detector. The polarization switch structure is used for controlling the polarization state of the optical signal; the Sagnac ring structure is used for performing different modulation on optical signals in different polarization states; and finally, an electric/optical frequency hopping carrier wave can be obtained by adjusting a digital control signal of the polarization switch structure. In addition, by adjusting the microwave modulation signal frequency of the Mach-Zehnder modulator, the frequency of the electric/optical frequency hopping carrier can be flexibly tuned. The method is flexible in control and simple in structure, and can be applied to important fields such as radars, electronic warfare and wireless communication systems.