Abstract Electromagnetic flanging is a potential forming technology for aluminum alloy. However, due to the temporal and spacial varied magnetic force acting on the workpiece, the forming process is not easy to be studied by experimental method and the final shape of the workpiece is difficult to control. This paper aims to investigate the forming process by numerical simulation and to utilize an efficient method to control the formed shape. The result shows that the plastic strain before collision is determined by the geometry, but not dependent on the discharge energy. The collision between the workpiece and die is benefit to the forming. The strain to failure of the annealed 2219 aluminum alloy for electromagnetic forming is 77.8% higher than that for quasi-static. In addition, the final shape of the workpiece can be precisely controlled by designing an appropriate die compensation angle.