Abnormal sensory function underlies visceral pain and other symptoms of functional and inflammatory bowel diseases. A protocol for the electrophysiological recording of the colonic afferent nerves in an ex vivo rat colorectum preparation is presented here.