Invasive plants such as spotted knapweed (Centaurea stoebe) are particularly detrimental to fragile ecosystems like semi-arid grasslands in the interior British Columbia, impacting aboveground and belowground ecology. Physical removal of C. stoebe has been one of the most popular invasive species management strategies, but the impact of C. stoebe removal on soil has hardly been studied. Here, we examine the legacy effect of C. stoebe on soil elemental composition and ecosystem function following its removal in the Lac Du Bios Grasslands Protected Area, British Columbia. First, we selected 40 paired C. stoebe invaded and control (uninvaded) plots and removed all vegetation from these plots. We planted Festuca campestris seedlings in these plots and harvested and weighed the biomass after four months. Additionally, we quantified total carbon and nitrogen in soil. We observed that C. stoebe invaded plots had significantly lower F. campestris biomass. Moreover, the total carbon and nitrogen content, and carbon/nitrogen ratio were significantly lower in C. stoebe invaded plots. We further analyzed 12 common soil elements and found the elemental composition was significantly different in C. stoebe invaded plots compared to controls. We investigated the impact of elemental composition on soil ecosystem functions (such as total soil carbon, total soil nitrogen, and F. campestris productivity). Our analysis revealed significant relationships amongst the elemental composition and total soil carbon and nitrogen, and F. campestris productivity. The results indicate that C. stoebe exerts a legacy effect by altering the soil elemental composition that may subsequently impacts soil ecosystem functions such as plant productivity and total carbon and nitrogen content.