The paper presents a model which simulate the case of a intense electron beam striking the bremsstrahlung convert target to generate backstreaming ions. The redistribution of space charge potential with backstreaming ions in front of target, the dynamic behavior of the backstreaming ions, the effect of backstreaming ions on the focal spot at the target are obtained according to this model. A method of dynamic magnetic field compensation for reducing the influence of backstreaming ions on the focal spot is presented, whose effect is also simulated. The simulation result shows that the method is very effective.