Micromolar concentration of magnesium (Mg) in culture solution is known to ameliorate aluminum (Al) toxicity in soybean and other leguminous species. To advance the understanding of this phenomenon at the level of gene expression in soybean, we undertook a comparative transcriptome analysis using DNA microarrays and Al-tolerant and Alsensitive genotypes treated with Al ions alone or Al plus Mg ions. We observed a more rapid alteration of transcription for Al-tolerant than Al-sensitive soybean after introduction of Mg into Al-containing medium, but at 72 h, far more genes were altered (both upregulated and downregulated) in the Al-sensitive line, reflecting the known greater saving effect of Mg for Al-sensitive than Al-tolerant lines. Mg appears to ameliorate Al toxicity in the sensitive genotype by the dual mechanisms of (i) specifically increasing the expression level of several genes that are upregulated in the Al-treated, Al-tolerant genotype in the absence of Mg and (ii) possibly saving energy by decreasing expression of most genes relative to expression under Al stress. Mg-mediated reduction in gene expression also appears to be an important mechanism of Mg protection of the Al-tolerant genotype.