Ninety crossbred (Large White × Landrace) female pigs were used to compare the effects on ultimate pork quality of different magnesium (Mg) compounds [magnesium aspartate (MgAsp) and magnesium sulfate (MgSO4)], Mg dose (1.6 and 3.2 g elemental Mg), and Mg supplementation period (2 and 5 days) in pigs subjected to an acute stressor pre-slaughter. Pigs fed the Mg-supplemented diets had lower muscle lactic acid concentrations at 24 h post-slaughter than pigs fed the control diet. There were no significant differences in muscle glycogen concentrations in the Longissimus thoracis (LT) at 5 min, 40 min, or 24 h post-slaughter between the control and Mg-supplemented diets. Pigs fed the Mg-supplemented diets produced less pale colour pork (i.e. darker colour) and had reduced drip loss and reduced incidence of pale, soft, exudative (PSE) pork in the LT muscle compared with pigs fed the control diet. Within the Mg diets, pigs fed the MgAsp-supplemented diet produced less pale LT muscle colour than pigs fed the MgSO4-supplemented diet. There were no significant differences in LT pork quality parameters (colour and percent drip loss) regardless of whether the high or low Mg dose or the 2- or 5-day supplementation period was used. This experiment has shown that the use of dietary MgAsp supplementation at a dose of 1.6 g elemental Mg (20 g MgAsp) for 2 days prior to slaughter significantly improved pork quality and reduced the incidence of PSE pork.