In this paper, a pulsed magnetic field device for controlling relativistic electron beam energy flux and uniformity is described. The device consists of magnetic field power supply, coils, and drift chamber of electron beam. Pulsed magnetic field is produced by capacitors discharge through six triggered vacuum switches to coils. The total energy storege of capacitors is 180kJ and the charging voltage is l0kV. When charging voltage is 7kV, magnetic field is 1.81T, with a risetime of 8.38ms. Influence of target meterials on distribution of the field is also discussed, and synchronizer between FLASH-Ⅱ and the magnetic field is introduced. The magnetic field device has been applied to FLASH-Ⅱ accelerator, and the reliability of the device has been proved by more than two hundreds of shots.