BackgroundStigma within the healthcare environment limits access to treatment for opioid use disorder (OUD), even as OUD results in significant morbidity and mortality. Language in clinical documentation affects patient experience and future care through the transmission of stigma or positive regard. With the passage of the 21st Century Cures Act, patients have full access to their medical records online.ObjectivesThe objective of our study was to understand providers' use of stigmatizing and affirming language in the electronic health record (EHR) for OUD patients with long hospital stays.MethodsWe selected patients with a first‐time referral to the Duke University Hospital OUD consult service who met diagnostic criteria for OUD with a hospital stay ≥28 days from July 2019 to February 2022. Two reviewers independently evaluated each admission and discharge note for stigmatizing or affirming language and the group met weekly to validate coding reliability.ResultsForty‐eight patients (96 notes) met our inclusion criteria. We identified 434 occurrences of stigmatizing and 47 occurrences of affirming language. One‐third (34%) of stigmatizing language appeared in system‐generated fields (drop‐down categories and diagnosis codes) and the rest was authored by providers.ConclusionsStigmatizing language was present in both provider‐ and system‐generated language and was nine times more frequent than affirming language in the medical records of hospitalized patients with OUD. While provider education may reduce stigmatizing language, institutional level changes to the EHR and International Classification of Disease codes are necessary to decrease stigmatizing language within medical records.