The purpose of this study was to analyse the comorbidity between headache and epilepsy in a large series of children with headache (1,795). Fifty-six cases (3.1%) suffered from idiopathic headache and idiopathic or cryptogenic epilepsy or unprovoked seizures. There was a strong association between migraine and epilepsy: in migraineurs (46/56) the risk of epilepsy was 3.2 times higher when compared with tension-type headache, without significant difference between migraine with and without aura (P = 0.89); children with epilepsy had a 4.5-fold increased risk of developing migraine than tension-type headache. In cases with comorbidity, focal epilepsies prevailed (43/56, 76.8%). Migraineurs affected by focal epilepsies (36/56) had a three times higher risk of having a cryptogenic epilepsy (27/36, 75%) than an idiopathic epilepsy (9/36, 25%) (P = 0.003). In migraine with aura, epilepsy preceded migraine in 71% of cases. Photosensitivity (7/56, 12.5%) and positive family history for epilepsy (22/56, 39%) were frequent in cases with comorbidity.