Soil salinization leading to ecological degradation and Melia azedarach can be effective in improving soil characteristics, such as reducing soil salinity. However, the mechanisms underlying the adaptation of Melia azedarach to saline-alkali land are unknown. In this study, we analyzed the soil properties and metabolome of Melia azedarach roots grown in high-salt (11.5 g/kg), medium-salt (7.5 g/kg), and low-salt soils (0.37 g/kg) to explore the mechanisms of adaptation of Melia azedarach to salt stress. Soil Na + was decreased, while soil organic matter, alkaline phosphatase and urease activities were increased when Melia azedarach was planted in low-, medium- and high- saline alkali soil. The metabolome analysis showed that the number of differential metabolites (DEMs), especially the up-regulated DEMs rose with the soil salinity increased. The sugar, amino acid and flavonoid DEMs produced by Melia azedarach were mostly up-regulated with the increase of soil salinity. The results demonstrated Melia azedarach was able to alleviate saline stress and reduce soil salinity. We propose that in situ bioremediation with Melia azedarach could be considered to ameliorate the coastal saline-alkali soil.