Magnesium (Mg) has been described to possess an anxiolytic function, but a number of studies present inconsistent results on this matter. In this study the effect of Mg deficiency on anxiety-related behavior, brain and blood plasma Mg in young adult male C57BL/6JOlaHsd and C57BL/6NCrl mice was studied. The animals were put on a control or Mg deficient diet from day 0 and significant hypomagnesaemia was evident from day 12 onwards in the test animals. Housing and test conditions were under either conventional light regime (white light behavioral test conditions) or reverse light regime (red light behavioral test conditions). The animals were tested in three tests for unconditioned anxiety: the modified Hole Board (day 14), the light-dark test (day 21) and the elevated plus maze (day 28). Overall integrated behavioral z-scores were calculated over these three behavioral tests. Mg showed a structure dependent distribution at the level of the brain, that differed between C57BL/6 substrain and light regime (conventional versus reverse), respectively. Likewise, total brain Mg did differ between substrain and light regime, but was not affected by the diet. Animals on the Mg deficient diet housed under conventional light regime had a higher final (day 28) blood plasma corticosterone level as compared to controls. Animals housed under reverse light regime exhibited no diet effect of plasma corticosterone levels. The significant hypomagnesaemia at blood plasma level resulted in an effect of Mg deficiency on avoidance, but not overall anxiety-related behavior. Significant differences regarding avoidance behavior were found between the two substrains and light regimes, respectively.