Opioids have demonstrated efficacy and often are drugs of choice in the management of postoperative pain. However, their use is often limited by adverse drug events (ADEs). The objective of this study was to determine the ADE rate in adult surgical patients who received opioids and the impact of opioid ADEs on length of stay (LOS), costs, and mortality. A hospital-based computerized system detected potential ADEs. Adult patients were selected if they received at least one dose of opioid medication during a surgical hospitalization between 1 January 1990 and 31 December 1999. Control patients were matched based on matching length of stay ([LOS] at least as long as time to ADE), age (within 10 years), sex, admission year, major disease category (MDC), and without an ADE. Linear regression models were used to determine the predictors of increased LOS, total hospital costs, and log-transformed total hospital costs. 60,722 patients received opioid medication during their surgical hospitalization and 2.7% experienced an opioid-related ADE. The most common clinical manifestations were nausea and vomiting (67%), and rash, hives, or itching (33.5%). No statistically significant difference was seen in mortality between ADE/non-ADE patients. ADE patients had statistically significant increases in LOS (0.53 days) and in log-transformed cost (16%). The estimated log cost difference of 16%, if applied to the median cost patient in the non-ADE group, averaged US$ 840. Opioid-related ADEs are common in hospitalized patients and increase LOS and total hospital costs.