Increasing evidence suggests there is a sex difference in opioid analgesia of pain arising from somatic tissue. However, the existence of a sex difference in visceral pain and opioid analgesia is unclear. This was examined in the colorectal distention (CRD) model of visceral pain in the current study. The visceromotor response (vmr) to noxious CRD was recorded in gonadally intact male and female rats. Subcutaneous injection of morphine dose-dependently decreased the vmr in both groups without affecting colonic compliance. However, morphine was significantly more potent in male rats than females. Because systemic morphine can act at peripheral tissue and in the central nervous system (CNS), the source of the sex difference in morphine analgesia was determined. The peripherally restricted mu-opioid receptor (MOR) antagonist naloxone methiodide dose-dependently attenuated the effects of systemic morphine. Systemic administration of the peripherally restricted MOR agonist loperamide confirmed peripherally mediated morphine analgesia and revealed greater potency in males compared with females. Spinal administration of morphine dose-dependently attenuated the vmr, but there was no sex difference. Intracerebroventricular administration of morphine also dose-dependently attenuated the vmr with significantly greater potency in male rats. The present study documents a sex difference in morphine analgesia of visceral pain that is both peripherally and supraspinally mediated.