A magnetic field modulated multi-target X-ray source for spatial X-ray communication comprises a cathode structure, a focusing groove, an electron emission source, a glass shell, a Kovar alloy ring, afocusing electrode, a modulation electromagnetic device, a multi-target metal anode, and a transmission window. The cathode is connected with a negative high voltage, the electron emission source isdisposed in the focusing groove, the glass shell and the focusing electrode are in tight coupling by the Kovar alloy ring, the modulation electromagnetic device is disposed near the multi-target metalanode, the multi-target metal anode is grounded, and one side is facing a focus channel and the other side is plated on the transmission window layer. The magnetic field modulated multi-target X-raysource utilizes a fast-responding high-frequency modulation magnetic field, changes the electron motion trajectory to bombard the multi-target metal anode, excites characteristic X-rays of different energies, and uses characteristic X-rays of different energies as signal transmission carriers to solve the problem that the existing intensity modulation X-ray source technology is less in loading symbol signal and low in communication rate. The magnetic field modulated multi-target X-ray source has the advantages of multiple types of loading symbol signals and large communication rate.