Microorganisms drive organic matter degradation and humification during composting. However, the mechanisms underlying microbial community succession and their interactions under saline-alkali stress are poorly understood. In this study, we investigated the microbial community assembly processes and microbial niche dynamics during composting in the high-saline-alkaline region. The niche breadth of the microbial community expanded from 5.8 to 15 and salt-alkali conditions alleviation prompted a shift in microbial community assembly towards stochastic processes. Alkalinity (R = 69.08%) and available phosphorus (AP) (R = 45.70%) are identified as the primary environmental stress factors. Salinity primarily impacted the niche breadth, while alkalinity predominantly determined the assembly processes of microorganisms. The degradation of organic matter in high-temperature environments enhanced the release of AP, altering the processes of microbial community assembly and driving niche differentiation within the microbial community. The abundant taxa actively responded to the changes in the environmental conditions, while the rare taxa maintained the community stability by expanding their ecological niches. The interactions between microorganisms are mainly based on synergism. The native microorganisms, such as Alcanivorax, Corynebacterium, and Rhodohalobacter, played a key role in promoting compost maturity. They tolerated the high-salinity and alkaline environments and also withstood high temperatures. This study revealed for the first time the succession mechanisms and interaction characteristics of microbial communities under salinity and temperature stress, providing theoretical guidance for microbial inoculation during the composting of high-saline and alkaline organic waste.