BACKGROUND: The relationship between alcohol consumption and migraine or severe headache remains controversial in the existing literature. Given that alcohol is a widely consumed beverage, clarifying the relationship between alcohol and migraine or severe headaches can help manage the patient's condition. AIM: This study aimed to investigate the potential relationship between alcohol consumption and migraine or severe headache. METHODS: Employing National Health and Nutrition Examination Survey (NHANES) database records spanning March 1999 to December 2004, our analysis encompassed threshold effects, smoothed curve fitting, and multivariate logistic regression to elucidate the relationship between alcohol consumption level and migraine or severe headaches. We utilized subgroup analyses and interaction tests to explore the stability of this relationship across different stratified populations. RESULTS: A total of 13,083 subjects were enrolled. The odds of migraine or severe headache decreased with increasing dietary alcohol intake. This was more pronounced in the older and male subgroups. CONCLUSIONS: There was a significant negative association between dietary alcohol intake and the odds of having migraine or severe headache.