Background: Trend analyses of opioid-related inpatient stays depend on the availability of comparable data over time. In October 2015, the US transitioned diagnosis coding from International Classification of Diseases, Ninth Revision, Clinical Modification (ICD-9-CM) to ICD-10-CM, increasing from ∼14,000 to 68,000 codes. This study examines how trend analyses of inpatient stays involving opioid diagnoses were affected by the transition to ICD-10-CM. Subjects: Data are from Healthcare Cost and Utilization Project State Inpatient Databases for 14 states in 2015-2016, representing 26% of acute care inpatient discharges in the US. Study Design: We examined changes in the number of opioid-related stays before, during, and after the transition to ICD-10-CM using quarterly ICD-9-CM data from 2015 and quarterly ICD-10-CM data from the fourth quarter of 2015 and the first 3 quarters of 2016. Results: Overall, stays involving any opioid-related diagnosis increased by 14.1% during the ICD transition - which was preceded by a much lower 5.0% average quarterly increase before the transition and followed by a 3.5% average increase after the transition. In stratified analysis, stays involving adverse effects of opioids in therapeutic use showed the largest increase (63.2%) during the transition, whereas stays involving abuse and poisoning diagnoses decreased by 21.1% and 12.4%, respectively. Conclusions: The sharp increase in opioid-related stays overall during the transition to ICD-10-CM may indicate that the new classification system is capturing stays that were missed by ICD-9-CM data. Estimates of stays involving other diagnoses may also be affected, and analysts should assess potential discontinuities in trends across the ICD transition.