Headache is one of the most common symptoms of epilepsy comorbidities. However, the relationship between the epilepsy and headache still needs clarification. Previous studies mostly investigated the overall incidence and clinical features of the headache in patients with the epilepsy. Temporal lobe epilepsy (TLE) and juvenile myoclonic epilepsy (JME) are the common types of focal epilepsy and generalized epilepsy, respectively. Nevertheless, there was no study comparing the clinical features of headache between TLE and JME. This study aimed to analyze the headache features of these two types of epilepsy. Patients with either TLE or JME diagnosed with headache and referred to the West China Hospital of Sichuan University were consecutively recruited from June 2021 to June 2022. The duration of epilepsy was longer than 6 months in these patients. Data on headache and epilepsy were obtained through face-to-face questionnaires. The headache was classified according to the International Classification Headache Disorders-3rd edition (ICHD-III) criteria. χ2-test, t-test, rank-sum test, logistic regression modeling and Mann Whitney test were used to compare the clinical differences of the headache in TLE and JME. A total of 151 TLE patients and 30 JME patients were enrolled in this study. There was no significant difference in the family history of headache, epilepsy durations, headache types, proportion receiving analgesic therapy, the frequency of inter-ictal headache (inter-IH), and the quality of life in epilepsy -10 inventory (QOLIE-10) between the TLE and JME patients. Patients in the TLE group were significantly older (p = 0.004), and a lower percentage of them had a family history of epilepsy (p = 0.007) compared with the JME patients. The proportion of cases with refractory epilepsy was higher in the TLE group than that in the JME group (p < 0.001). The types of seizures in the TLE group varied from those in the JME group (p < 0.001). The composition of the antiseizure medications (ASM) applied in the TLE group differed from that in the JME group (p = 0.047), and the usage of oxcarbazepine was more frequently in the TLE group than in the JME group (p = 0.003). There was no difference in the headache types among patients with TLE or JME. Specifically, 67 (44.37%), 12 (7.95%), and 118 (7.95%) patients were found with inter-IH, pre-ictal headache (Pre-IH) and post-ictal headache (Post-IH) in the TLE group; while 8 (26.67%), 4 (13.33%) and 26 (86.67%) patients had inter-IH, Pre-IH and Post-IH in the JME group. Thirty-nine patients in the TLE group and 4 patients in the JME group were identified with more than one type of headaches, respectively. Tension-type headache (TTH) were found in 38 patients (25.17%) in the TLE group and 3 patients (10.00%) in the JME group, respectively; migraines were found in 10 patients (6.62%) in the TLE group and in 2 patients (6.67%) in the JME group. Patients in the TLE group had a higher headache-attributed lost time-90 days (HLT-90) score than those in the JME group (p = 0.019). The proportion of patients with inter-IH accompanied by nausea in the TLE group was higher than that in the JME group (p = 0.029), while the proportion of patients with frontal headache was lower than that in the JME group (p < 0.05). There was no significant difference in headache severity, quality, headache nature, unilateral/bilateral, and headache duration either in inter-IH or peri-ictal headache (Peri-IH) between the two groups. The logistic regression analysis suggested that except for HLT-90 (AUC = 0.622, p = 0.027), other factors were not found to be correlated with refractory epilepsy. The clinical features of headache differed between TLE and JME patients. TLE patients had a higher ratio of refractory epilepsy, more headache time loss compared with JME patients. HLT-90 was associated with the occurrence of refractory epilepsy in TLE patients. Taken together, we suggested that the comorbid headache may essentially be different between TLE and JME patients.