Alfalfa ( Medicago sativa L.) is a crucial and widely grown forage legume that faces yield challenges due to salinity stress. In this study, an R2R3-MYB transcription factor (TF), MsEOBI was characterized from alfalfa. Its function and gene regulatory pathways were studied in alfalfa seedlings. The nuclear-localized MsEOBI acts as a transcriptional activator. MsEOBI enhances salinity tolerance of alfalfa by promoting flavonoids and lignin biosynthesis, as well as scavenging reactive oxygen species (ROS). MsEOBI also promote pollinator attraction and seed yield by activating volatile phenylpropanoid biosynthesis. Yeast one-hybrid, dual-luciferase, and ChIP-qPCR assays showed that MsEOBI binds directly to the promoter of MsPAL1, a key enzyme in the phenylpropanoid pathway to activate its expression. Overexpression of MsPAL1 in alfalfa enhances salinity tolerance. These findings shed light on the functions of the MsEOBI-MsPAL1 module in alfalfa and offer valuable genetic resources for the breeding of salt stress-resistant varieties in the future.