Learning and memory are fundamental brain functions affected by dietary and environmental factors. Here, we show that increasing brain magnesium using a newly developed magnesium compound (magnesium-L-threonate, MgT) leads to the enhancement of learning abilities, working memory, and short- and long-term memory in rats. The pattern completion ability was also improved in aged rats. MgT-treated rats had higher density of synaptophysin-/synaptobrevin-positive puncta in DG and CA1 subregions of hippocampus that were correlated with memory improvement. Functionally, magnesium increased the number of functional presynaptic release sites, while it reduced their release probability. The resultant synaptic reconfiguration enabled selective enhancement of synaptic transmission for burst inputs. Coupled with concurrent upregulation of NR2B-containing NMDA receptors and its downstream signaling, synaptic plasticity induced by correlated inputs was enhanced. Our findings suggest that an increase in brain magnesium enhances both short-term synaptic facilitation and long-term potentiation and improves learning and memory functions.