Background Opioid substitution therapy (also known as ‘opioid agonist therapy’ or ‘medication treatment of opioid use disorder’) is associated with improved health and social outcomes for people who use heroin and other illicit opioids. It is typically managed in the community and is not always continued when people are admitted to hospital. This causes opioid withdrawal, patient-directed discharge, and increased costs. We are establishing a project called iHOST (improving hospital opioid substitution therapy) to address these problems. This is an applied health research project in which we will develop and evaluate an intervention that aims to improve opioid substitution therapy in three acute hospitals in England. The intervention was developed in collaboration with stakeholders including people who use opioids, hospital staff, and other professionals who work with this group. It includes five components: (1) a card that patients can use to help hospital clinicians confirm their opioid substitution therapy, (2) a helpline for patients and staff, (3) an online training module for staff, (4) a clinical guideline for managing opioid withdrawal in hospital, and (5) ‘champion’ roles at each hospital. Methods We will do a mixed-methods study including a quasi-experimental quantitative study and a qualitative process evaluation. The primary outcomes for the quantitative study are patient-directed discharge and emergency readmission within 28 days. We will do a difference-in-difference analysis comparing changes in these outcomes for patients at iHOST sites with changes for patients at control hospitals. The process evaluation will use in-depth interviews, focus groups, and site observations with people who use opioids and staff. We will assess acceptability of the intervention, barriers and facilitators to implementation, and contextual factors impacting outcomes. Impact We anticipate that iHOST will improve care for hospital patients who use illicit opioids and/or are receiving community-based opioid substitution therapy. Depending on the results, we will promote the intervention at hospitals across the UK. Dissemination, including through publication, will inform hospital-based services for people who use drugs both in the UK and other countries.