Enhancement of pattern separation could be helpful in improving the quality of normal daily learning and in treating individuals with cognitive impairment and certain psychiatric disorders. Previously, we have shown that elevating brain magnesium, by a novel magnesium compound (magnesium-L-threonate; MgT), enhances extinction of fear memory without enhancing amygdala-dependent fear memory. Here, we investigated the effects of MgT treatment on contextual-fear memory and subsequent pattern separation. Sprague-Dawley male rats were treated with MgT for 4 weeks and memory was evaluated using a spatial-context fear conditioning task. The pattern separation ability of MgT-treated rats was assessed using a spatial-context-discrimination task. MgT treatment did not enhance the retention of contextual-fear memory. Interestingly, the ability to discriminate between two, more or less distinct, contexts was enhanced in MgT-treated rats. Our results suggest that elevation of brain magnesium might be helpful in enhancing spatial-context discrimination and/or pattern separation besides preventing aversive-event-induced overgeneralization of fear.