While cross-sectional studies have demonstrated an association between headache and temporomandibular disorder (TMD), whether headache can predict the onset of TMD is unknown. The aims of this study were to evaluate the contribution of headache to the risk of developing TMD and describe patterns of change in headache types over time. An initially TMD-free cohort of 2410 persons with low frequency of headache completed quarterly questionnaires assessing TMD and headache symptoms over a median 3.0-year follow-up period. First-onset TMD was confirmed by clinical examination in 199 participants. Baseline reports of migraine (hazard ratio [HR] = 1.67, 95% confidence interval [CI]: 1.06-2.62) or mixed headache types (HR = 4.11, 95% CI: 1.47-11.46), or headache frequency (HR = 2.13, 95% CI: 1.31-3.48) predicted increased risk of developing TMD. In addition, headache dynamics across the follow-up period before the TMD onset were evaluated in a nested case-control study where 248 incident TMD cases were matched to 191 TMD-free controls. Both headache prevalence and frequency increased across the observation period among those who developed TMD but not among controls. Patients with TMD were more likely to experience worsening in the headache type compared with that by controls, eg, prevalence of definite migraine among TMD cases increased 10-fold. Among all headache types experienced by patients with TMD before the TMD onset, migraine had the highest odds of progression relative to remission (odds ratio = 2.8, 95% CI: 1.6-4.8), whereas for controls this ratio was significant only for the tension-type headache (odds ratio = 2.1, 95% CI: 1.2-3.9). The important clinical implication of these findings is that adequate treatment of migraine may reduce the risk for developing TMD.