Soil salinization is considered a major global environmental problem due to its adverse effects on agricultural sustainability and production. Compost is an environmentally friendly and sustainable measure used for reclaiming saline–sodic soil. However, the responses of the physiological characteristics of alfalfa and the structure and function of rhizosphere fungal communities after compost application in saline–sodic soil remain elusive. Here, a pot experiment was conducted to explore the effect of different compost application rates on soil properties, plant physiological traits, and rhizosphere fungal community characteristics. The results showed that compost significantly increased soil nutrients and corresponding soil enzyme activities, enhanced leaf photosynthesis traits, and ion homeostasis compared with the control treatment. We further found that the rhizosphere fungal communities were dominated by Sodiomyces at the genus level, and the relative abundance of pathogenic fungi, such as Botryotrichum, Plectosphaerella, Pseudogymnoascus, and Fusarium, declined after compost application. Moreover, the α-diversity indexes of the fungal community under compost application rates of 15% and 25% significantly decreased in comparison to the control treatment. The soil SOC, pH, TP, and TN were the main environmental factors affecting fungal community composition. The leaf photosynthetic traits and metal ion contents showed significantly positive correlations with Sodiomyces and Aspergillus. The fungal trophic mode was dominated by Pathotroph–Saprotroph–Symbiotroph and Saprotroph. Overall, our findings provide an important basis for the future application of microbial-based strategies to improve plant tolerance to saline-alkali stress.