Through the metal inert gas welding (MIG) experiment, the effects of the different welding parameters on the microstructure, the weld configuration and the mechanical properties of the joint of the magnesium (Mg) alloy AZ31B were analyzed. The results indicate that with the increase in the welding current, the microstructure change of the weld is characterized by the grain coarsening, and the microstructure change of the heat affected zone is characterized by the grain coarsening and the broadening of the heat affected zone. An exorbitant welding current is inimical to the weld configuration. With the increase in the welding speed, the welding linear energy decreases, inducing the formation of the finer equiaxed grains in the weld. Moreover, the grains in the heat affected zone are also with the trend of the refinement, and thus the mechanical properties of the joint increase. The optimal welding current and speed in our experiment are 160-170A and 400-450mm/min, respectively.