ObjectiveTo investigate gastrointestinal (GI)‐related physician visits and drug dispensations in the 5 years preceding a first recorded demyelinating event or multiple sclerosis (MS) onset.MethodsUsing linked administrative and clinical data from British Columbia (1996–2013), Canada, we identified an administrative cohort via a validated algorithm (n = 6863), a clinical cohort diagnosed at a MS clinic (n = 966), and matched controls (administrative cohort: n = 31,865; clinical cohort: n = 4534). In each cohort, the 5 years before a first demyelinating event or MS symptom onset (i.e., index date) were examined. We compared rates of GI‐related physician visits and risk of ≥1 GI‐related dispensation between MS cases and controls using negative binomial and robust Poisson models. Sex differences were tested using interaction terms.ResultsThe administrative cohort MS cases had higher rates of physician visits related to gastritis and duodenitis (adjusted rate/risk ratio (aRR):1.42, 95% CI: 1.10–1.83) and diseases of the esophagus (aRR: 1.46, 95% CI: 1.06–2.02) prior to the index date. MS cases also had greater risk of at least one dispensation for several drug classes, including constipation‐related (aRR: 1.82, 95% CI: 1.50–2.22), antiemetics/antinauseants (aRR: 1.64, 95% CI: 1.43–1.89), and propulsives (promotility drugs; aRR: 1.62, 95% CI: 1.47–1.79). Men had a disproportionally higher relative risk for propulsives than women (aRR: men = 2.32, 95% CI: 1.79–3.00; women = 1.54, 95% CI: 1.36–1.72). Several findings were similar in the smaller clinical cohort though none reached statistical significance.InterpretationGI‐related physician visits and drug dispensations were more common in the 5 years before the first demyelinating event versus matched controls. GI symptoms are a measurable feature of the prodromal or early phase of MS, with a sex difference evident.