Mississippi State (6-7) first-year coach Rick Ray won his SEC debut. Sword shot 6 of 11 from the field and had a dunk with 26 seconds left that provided enough separation for the victory.
South Carolina's Bruce Ellington and Brian Richardson both missed contested 3-pointers in the final seconds. The Gamecocks (10-4) couldn't overcome 24 turnovers. Richardson led South Carolina with 20 points.
The Gamecocks took a 50-44 lead with 5:25 remaining, but the Bulldogs responded with an 8-0 run that provided the momentum to get the win.
Mississippi State won despite missing all 10 of its 3-point attempts. The Gamecocks were 8 of 21 from long range.
South Carolina looked like it might pull out a win, but the Bulldogs' pressure defense forced the Gamecocks into consistently bad decisions late. South Carolina's turnovers fueled several easy Mississippi State baskets in the final minutes and the Bulldogs pushed ahead 52-50 with 3 minutes left.
Mississippi State's offense ranked among the league's worst during non-conference play, so the slow, half-court game suited the Bulldogs.
But the poor shooting was tough to overcome. Mississippi State shot just 38.8 percent from the field (19 of 49).
Mississippi State has just seven scholarship players because of injuries and attrition. The Bulldogs predictably struggled during non-conference play, including a loss to Alabama A&M that Ray called a "public embarrassment" earlier in the week.
That all made the win over South Carolina even more important and Sword is one of the key players who must improve if Mississippi State wants to be competitive in the SEC. The 6-foot-3 freshman from Montgomery, Ala., has had bouts of good play this season, but also stretches of exasperating turnovers and poor shot selection.
Those problems sometimes surfaced on Wednesday. He had seven turnovers against the Gamecocks, but there was little doubt the good outweighed the bad. Colin Borchert added eight points and four blocked shots.
South Carolina's roster isn't quite as thin as Mississippi State's, but is undeniably in transition during coach Frank Martin's first season. The problems were obvious in the backcourt, where the Gamecocks simply couldn't handle Mississippi State half-court pressure defense.
Mississippi State scored 28 points off the Gamecocks' 24 turnovers.
Ellington, who was playing football for South Carolina just two weeks ago, showed his rust with nine turnovers. He also added 11 points.
Follow David Brandt on Twitter: www.twitter.com/davidbrandtAP
With the Suns drafting Tyler Ulis, they now have Five guards on their roster who attended Kentucky.
NBA fans will be looking forward to their newest players making plays like this next season.
Tim Legler and Brad Daugherty analyze Ben Simmons and Brandon Ingram, the top two picks in the NBA draft, and agree that Simmons will have a more immediate impact.