Traumatic brain injury (TBI) causes several long-term disabilities, particularly headaches. An association between TBI and subsequent migraine has been reported. However, few longitudinal studies have explained the link between migraine and TBI. Moreover, the modifying effects of treatment remain unknown. This retrospective cohort study used records from Taiwan’s Longitudinal Health Insurance Database 2005 to evaluate the risk of migraine among patients with TBI and to determine the effects of different treatment modalities. Initially, 187,906 patients, aged ≥ 18 years, who were diagnosed as TBI in 2000, were identified. In total, 151,098 patients with TBI and 604,394 patients without TBI were matched at a 1:4 ratio according to baseline variables during the same observation period. At the end of follow-up, 541 (0.36%) and 1491 (0.23%) patients in the TBI and non-TBI groups, respectively, developed migraine. The TBI group exhibited a higher risk of migraine than the non-TBI group (adjusted HR: 1.484). Major trauma (Injury Severity Score, ISS ≥ 16) was associated with a higher migraine risk than minor trauma (ISS < 16) (adjusted HR: 1.670). However, migraine risk did not differ significantly after surgery or occupational/physical therapy. These findings highlight the importance of long-term follow-up after TBI onset and the need to investigate the underlying pathophysiological link between TBI and subsequent migraine.