In the present work, an accurate 3D-FE model for simulating the extrusion process of AZ31 magnesium alloy tube was established based on the DEFORM 3D software package. The metal flow behavior and formation process of weld seam in the porthole die were revealed. The evolutions of temperature, velocity, and effective stress during the whole extrusion cycle were investigated. The K welding criteria was utilized to evaluate the influence of extrusion speed on the seam weld quality. Extrusion experiments were carried out at the extrusion speed ranging from 0.25 to 4 mm/s on an 800-t extrusion press. The simulation results show that the temperature distribution in the workpiece was not homogeneous. As the extrusion process proceeded, the greater the temperature gradient of workpiece was. The maximum temperature appeared at the bearing region. The dead metal zones existed at the corner between the container and the die face and between the bottom and the sidewall of welding chamber. The effective stress near the bearing and welding chamber was maximum, followed by the inlet ports of porthole die, and the minimum value was located in the container. As extrusion speed increased, the temperature, welding pressure, and effective stress on the welding plane increased simultaneously. The calculated K value decreased rapidly when extrusion speed increased from 0.5 to 2 mm/s and then reduced slowly when larger than 2 mm/s. Extrusion speed had a negative influence on the seam weld quality. The criteria exhibited a good predicting capability as compared with the experimental results. The optimum extrusion speed was about 0.5 mm/s for the extrusion of AZ31 magnesium alloy tube at the billet temperature of 400 °C on the 800-t extrusion press.