Melatonin, a pleiotropic regulatory molecule, is involved in the defense against heavy metal stress. Here, we used a combined transcriptomic and physiological approach to investigate the underlying mechanism of melatonin in mitigating chromium (Cr) toxicity in Zea mays L. Maize plants were treated with either melatonin (10, 25, 50 and 100 μM) or water and exposed to 100 μM K2Cr2O7 for seven days. We showed that melatonin treatment significantly decreased the Cr content in leaves. However, the Cr content in the roots was not affected by melatonin. Analyses of RNA sequencing, enzyme activities, and metabolite contents showed that melatonin affected cell wall polysaccharide biosynthesis, glutathione (GSH) metabolism, and redox homeostasis. During Cr stress, melatonin treatment increased cell wall polysaccharide contents, thereby retaining more Cr in the cell wall. Meanwhile, melatonin improved the GSH and phytochelatin contents to chelate Cr, and the chelated complexes were then transported to the vacuoles for sequestration. Furthermore, melatonin mitigated Cr-induced oxidative stress by enhancing the capacity of enzymatic and non-enzymatic antioxidants. Moreover, melatonin biosynthesis-defective mutants exhibited decreased Cr stress resistance, which was related to lower pectin, hemicellulose 1, and hemicellulose 2 than wild-type plants. These results suggest that melatonin alleviates Cr toxicity in maize by promoting Cr sequestration, re-establishing redox homeostasis, and inhibiting Cr transport from the root to the shoot.