Saline-alkali soils are widely distributed in China, affecting plant growth and sustainable development of ecosystems. This study characterized the effects of planting Melia azedarach L. on chemical properties and microbial communities in saline-alkali soils [bare (CK), bulk (BS) and rhizosphere soil (RS)]. Compared with the bare soil, planting Melia azedarach L. lowered salt content and concentrations of extractable Na, K, Ca, Mg and Cl-, but significantly increased organic matter, total nitrogen, total phosphorus, available phosphorus, soil urease activity and alkaline phosphatase activity in the rhizosphere soil. High-throughput sequencing results indicated that bacterial richness and diversity decreased in the order RS>BS>CK. The richness of fungi was ranked RS>CK>BS, and their diversity decreased in the order CK>RS>BS. The three dominant bacterial phyla were Proteobacteria, Actinobacteria and Bacteroidetes, and the three dominant fungal phyla were Ascomycota, Basidiomycota and Glomeromycota. Redundancy analysis indicated that total phosphorus concentration and alkaline phosphatase activity significantly influenced bacterial diversity, whereas soil Ca and Mg concentrations were closely related to the fungal community diversity. In conclusion, planting Melia azedarach L. improved soil properties, increased the diversity and richness of soil microbial communities, and thus ameliorated the saline-alkali soil.