Thiopurines are widely used as maintenance therapy in inflammatory bowel disease (IBD) but the evidence base for their use is sparse and their role increasingly questioned. Using the largest series reported to date, we assessed the long-term effectiveness of thiopurines in ulcerative colitis (UC) and Crohn's disease (CD), including their impact on need for surgery. Outcomes were assessed in 11 928 patients (4968 UC, 6960 CD) in the UK IBD BioResource initiated on thiopurine monotherapy with the intention of maintaining medically induced remission. Effectiveness was assessed retrospectively using patient-level data and a definition that required avoidance of escalation to biological therapy or surgery while on thiopurines. Analyses included overall effectiveness, time-to-event analysis for treatment escalation and comparison of surgery rates in patients tolerant or intolerant of thiopurines. Using 68 132 patient-years of exposure, thiopurine monotherapy appeared effective for the duration of treatment in 2617/4968 (52.7%) patients with UC compared with 2378/6960 (34.2%) patients with CD (p<0.0001). This difference was corroborated in a multivariable analysis: after adjusting for variables including treatment era, thiopurine monotherapy was less effective in CD than UC (OR 0.47, 95% CI 0.43 to 0.51, p<0.0001). Thiopurine intolerance was associated with increased risk of surgery in UC (HR 2.44, p<0.0001); with a more modest impact on need for surgery in CD (HR=1.23, p=0.0015). Thiopurine monotherapy is an effective long-term treatment for UC but significantly less effective in CD. © Author(s) (or their employer(s)) 2021. Re-use permitted under CC BY. Published by BMJ.