Background and objectives: Migraine is among the most common headaches, with a 15% worldwide incidence. It is distinguished by neurovascular dysfunction and recurring headaches. Magnesium (Mg), as a controller of synaptic activity, is hypothesised to play a role in migraine pathogenesis. The cerebral cortex's hyperexcitability has been identified as a key feature in the pathophysiology of migraine, and magnesium (Mg) is a known neuronal excitability regulator. To evaluate the serum magnesium levels of migraine patients during and between attacks to those of healthy controls. Methods: Sixty migraine patients who met the inclusion criteria and the equal number of healthy controls were enrolled in the study. For the diagnosis of migraine, the International Classification of Headache Disorders, 3rd Edition, 2013 (ICHD-III) criteria were applied. Result: The mean serum magnesium levels of migraine patients throughout the interictal phase were significantly lower than those of healthy controls (1.849 0.135 vs 2.090 0.205, P 0.001, statistically significant). During attacks, the mean serum magnesium concentration was substantially lower than between attacks (P = 0.003, 1.822 0.149 vs 1.849 0.135, respectively). In migraine patients, serum magnesium levels exhibited an inverse linear relationship with attack frequency. Conclusion: The relatively low serum magnesium levels in migraine patients compared to healthy controls and the inverse relationship between serum magnesium levels and the frequency of migraine attacks suggest that magnesium plays a significant role in the pathogenesis of migraine and may be a viable therapeutic option.