In the practice of neurologists and therapists, patients with complaints of headache, increased fatigue, and irritability are common. The most frequent causes of headaches in ambulatory patients are primary headaches (migraine and tension headaches). Lack of sleep, stress, symptoms of anxiety and depression, and abuse of analgesic drugs are the most common factors that contribute to the frequency of headaches. Magnesium deficiency is another factor, the role of which has been discussed in the frequency of primary headaches, in the development of neurotic disorders and depression. Clinical manifestations of magnesium deficiency itself usually include such nonspecific symptoms as fatigue, anxiety, irritability, numbness in the extremities, leg cramps, sleep disorders, etc.Magnesium deficiency is widespread among the population of developed countries, especially among women of reproductive age, often occurs during pregnancy, while taking oral contraceptives. Magnesium is involved in the regulation of the nervous system, neuromuscular transmission, cardiac activity, regulation of vascular tone, blood clotting and bone tissue metabolism. Magnesium deficiency is associated with diseases such as coronary heart disease, hypertension, type 2 diabetes, Alzheimer’s disease, migraine, osteoporosis, depression, neurotic disorders (panic disorder, generalized anxiety, various phobias), and fibromyalgia syndrome. Stress can lead to a decrease in magnesium levels in the body, and magnesium deficiency, in turn, reduces tolerance to stressful situations. Timely diagnosis and adequate treatment of magnesium deficiency and associated conditions represent important clinical challenges.The clinical case of a patient with neurotic disorder, headache and magnesium deficiency is presented, and the effectiveness of an interdisciplinary approach including an educational talk, adequate therapy for headache management, magnesium drug therapy and psychological methods is demonstrated. The role of magnesium deficiency in the development of various neurologic diseases is reviewed. The most effective magnesium compounds for therapy are discussed. Principles of diagnosis and treatment of patients with magnesium deficiency are presented.