Spartina alterniflora has significantly altered coastal ecosystems. Understanding macrofaunal responses to its invasion is crucial for managing coastal wetlands. Five invasion stages over 16 years were analyzed: no invasion, initial, young, mature, and senescing. Macrofaunal biodiversity initially increased but later declined. Environmental properties varied by stages, creating distinct habitats. The impact on macrofauna depended on species traits and invasion stage. Key species accounting for 49.54 % of dissimilarity were Stenothyra glabra, Bullacta caurina, Pseudomphala latericea, and Potamocorbula laevis. Trophic structure initially remained stable but shifted later. Organic carbon (OC), total nitrogen (TN), and C/N ratio correlated with S. alterniflora development. Height of S. alterniflora was a key environmental indicator, while OC content and C/N ratio were crucial for shaping the macrofaunal community, indicating food source changes. This study provides valuable insights for managing coastal environments.