Abstract Previous reports suggest that melatonin may play an important role in visceral nociception and neurogenic inflammation. We aimed to examine the role of melatonin on visceral hypersensitivity and to explore the site of action using a rat model of post-inflammatory visceral hyperalgesia. In all rats, a baseline viscero-motor response (VMR) to graded colorectal distension (CRD; 10–60 mmHg) was recorded prior and 1 week following tri-nitrobenzenesulfonic acid (TNBS) induced colonic inflammation. Melatonin (30, 45 or 60 mg/kg, ip) was given 20 min before testing the VMR in naïve and TNBS-treated rats. Extracellular single-unit recordings were made from CRD-sensitive pelvic nerve afferent (PNA) fibers and lumbosacral (LS) spinal neurons in TNBS-treated animals. The effect of melatonin (60 mg/kg) was examined on responses of PNAs and spinal neurons to graded CRD. In separate experiments, luzindole (non-specific MT 1/MT 2 receptor antagonist) or naltrexone (non-specific opiod receptor antagonist) was injected prior to melatonin. Following TNBS, there was a significant increase in the VMR to CRD compared to baseline. This increase was attenuated by melatonin (60 mg/kg) at pressures >20 mmHg. The same dose of melatonin had no effect on the VMR in naïve animals. In TNBS-treated rats, melatonin significantly attenuated the responses of CRD-sensitive spinal neurons to CRD, but had no effect in spinal transected rats or PNA fibers. Both luzindole and naltrexone blocked melatonin’s effect on the VMR and LS spinal neurons. Results indicate melatonin’s antinociceptive effects are not via a peripheral site of action but rather a supra-spinal process linked to the central opioidergic system.