Magnesium has been shown to produce an antinociceptive effect on animal models of neuropathic and inflammatory pain. It has also been shown to exert an analgesic effect on humans in conditions presenting acute (postoperative pain) and chronic (neuropathic) pain. As it is known that magnesium is a physiological antagonist of the N-methyl-Daspartate (NMDA) receptor ion channel, and that the NMDA receptor plays a key role in central sensitization, the primary mechanism through which magnesium produces its analgesic effect is believed to be blockade of the NMDA receptor in the spinal cord. In addition, magnesium blocks calcium channels and modulates potassium channels. The activation of the nitric oxide (NO) pathway could have an important role in the antinociceptive effects of systemic magnesium sulfate in the somatic, but not in the visceral model of inflammatory pain. Although it is known for some time that intramuscular, intravenous and subcutaneous injections of magnesium sulfate in humans, and intraperitoneal injection in rodents produce local pain sensation, the mechanism of this action was elucidated only recently. It was demonstrated that subcutaneous injection of an isotonic, pHadjusted (7.4) solution of magnesium sulfate (6.2%) to rats produces local peripheral pain via activation of peripheral TRPA1, TRPV1, TRPV4 and NMDA receptors and peripheral production of NO. In animal models of pain, magnesium has been shown to exert both antinociceptive and pronociceptive effects by acting on different ion channels and NO pathways, however, the precise mechanisms remain to be elucidated.