ObjectiveGut microbiota (GM) has previously been associated with alterations in rodent behaviour, and since the GM is affected by the diet, the composition of the diet may be an important factor contributing to behavioural changes. Interestingly, a magnesium restricted diet has been shown to induce anxiety and depressive-like behaviour in humans and rodents, and it could be suggested that magnesium deficiency may mediate the effects through an altered GM.MethodsThe present study therefore fed C57BL/6 mice with a standard diet or a magnesium deficient diet (MgD) for 6 weeks, followed by behavioural testing in the forced swim test (FST) to evaluate depressive-like behaviour. An intraperitoneal glucose tolerance test (GTT) was performed 2 day after the FST to assess metabolic alterations. Neuroinflammatory markers were analysed from hippocampus. GM composition was analysed and correlated to the behaviour and hippocampal markers.ResultsIt was found that mice exposed to MgD for 6 weeks were more immobile than control mice in the FST, suggesting an increased depressive-like behaviour. No significant difference was detected in the GTT. GM composition correlated positively with the behaviour of undisturbed C57BL/6 mice, feeding MgD diet altered the microbial composition. The altered GM correlated positively to the hippocampal interleukin-6.ConclusionIn conclusion, we hypothesise that imbalances of the microbiota–gut–brain axis induced by consuming a MgD diet, contributes to the development of depressive-like behaviour.