In terms of antinociceptive action, the main mode of action of magnesium involves its antagonist action at the -methyl-d-aspartate (NMDA) receptor, which prevents central sensitization and attenuates preexisting pain hypersensitivity. Given the pivotal function of NMDA receptors in pain transduction, magnesium has been investigated in a variety of pain conditions. The oral and parenteral administration of magnesium via the intravenous, intrathecal, or epidural route may alleviate pain and perioperative anesthetic and analgesic requirements. These beneficial effects of magnesium therapy have also been reported in patients with neuropathic pain, such as malignancy-related neurologic symptoms, diabetic neuropathy, postherpetic neuralgia, and chemotherapy-induced peripheral neuropathy. In addition, magnesium treatment is reportedly able to alleviate fibromyalgia, dysmenorrhea, headaches, and acute migraine attacks. Although magnesium plays an evolving role in pain management, better understanding of the mechanism underlying its antinociceptive action and additional clinical studies is required to clarify its role as an adjuvant analgesic.