Preclinical and some clinical studies suggest a relationship between perturbation in magnesium (Mg2+) homeostasis and pathological anxiety, although the underlying mechanisms remain largely unknown. Since there is evidence that Mg2+ modulates the hypothalamic-pituitary adrenal (HPA) axis, we tested whether enhanced anxiety-like behaviour can be reliably elicited by dietary Mg2+ deficiency and whether Mg2+ deficiency is associated with altered HPA axis function. Compared with controls, Mg2+ deficient mice did indeed display enhanced anxiety-related behaviour in a battery of established anxiety tests. The enhanced anxiety-related behaviour of Mg2+ deficient mice was sensitive to chronic desipramine treatment in the hyponeophagia test and to acute diazepam treatment in the open arm exposure test. Mg2+ deficiency caused an increase in the transcription of the corticotropin releasing hormone in the paraventricular hypothalamic nucleus (PVN), and elevated ACTH plasma levels, pointing to an enhanced set-point of the HPA axis. Chronic treatment with desipramine reversed the identified abnormalities of the stress axis. Functional mapping of neuronal activity using c-Fos revealed hyper-excitability in the PVN of anxious Mg2+ deficient mice and its normalisation through diazepam treatment. Overall, the present findings demonstrate the robustness and validity of the Mg2+ deficiency model as a mouse model of enhanced anxiety, showing sensitivity to treatment with anxiolytics and antidepressants. It is further suggested that dysregulations in the HPA axis may contribute to the hyper-emotionality in response to dietary induced hypomagnesaemia. This article is part of a Special Issue entitled ‘Anxiety and Depression’.