Our objective was to investigate the therapeutic potential of peripheral opioid antagonism with alvimopan and anti-inflammatory cyclooxygenase 2 (COX-2) inhibition in an animal model of postoperative ileus with pain management. Intestinal manipulation was conducted in mice and rats with or without postoperative morphine injection. Rodents were orally fed non-digestible fluorescein (FITC)-labelled dextran and transit measured after a period of 90 min. The immunomodulatory effects of morphine and alvimopan were determined on nitric oxide released from the organ cultured muscularis externa. Surgical manipulation of the intestine resulted in a delay in gastrointestinal transit after 24 h that worsened with exogenous morphine. Alvimopan did not significantly alter transit of control or manipulated animals, but significantly antagonized the transit delaying effects of morphine. However, when the inflammatory component was robust enough to obscure a further opioid induced delay in gastrointestinal transit, alvimopan ceased to be effective in improving postoperative intestinal function. Cyclooxygenase 2 inhibition significantly diminished the inflammatory component of postoperative ileus. Surgical manipulation resulted in an increased release of nitric oxide from the inflamed isolated muscularis externa in 24-h organ culture which was not altered by morphine or alvimopan. Two distinct mechanisms exist which participate in postoperative bowel dysfunction: a local inflammatory response which is antagonized by COX-2 inhibition, and a morphine-induced alteration in neural function which can be blocked with alvimopan.