Abdul Ado added 16 points as the Bulldogs (16-6, 4-5 Southeastern Conference) won away from the home for the first time this season after six losses.
Frank Booker scored 25 points and Chris Silva added 18 to lead the Gamecocks, 13-9, 4-5, who lost a second consecutive game for just the second time this season.
MSU led by one point after a first half in which the lead changed hands 10 times, and the lead changed hands four times during the first minute of the second half.
A three-point play by Quinndary Weatherspoon, a steal and a jumper by Xavien Stapleton and a jumper by Aric Holman completed a 9-0 run that gave the Bulldogs a 48-40 lead.
Booker made two 3-pointers as the Gamecocks got within four, but Weatherspoon made a 3-pointer and Eli Wright made a jumper to give the Bulldogs a nine-point lead.
Silva scored seven points and Maik Kotsar's layup pulled South Carolina within 65-64.
The Gamecocks got within one point twice more before Weatherspoon made a 3-pointer and Lamar Peters a layup for a 75-69 lead with 4:08 left.
Silva made a free throw and Wesley Myers hit a jumper to cut the lead to 77-74 with 1:14 left.
After a turnover, South Carolina had a chance to tie, but Myers missed a 3-pointer and Holman got free for a dunk and a five-point lead.
Booker was fouled while missing a 3-pointer and he made 2 of 3 free throws to make it 79-76 with nine seconds left.
Holman made two free throws with eight seconds left to seal the victory.
The score was tied for the fourth time at 27 before Weatherspoon broke it with a layup.
David Beatty followed with a 3-pointer and Hassani Gravett made two free throws to give South Carolina a 32-29 lead.
The Gamecocks led by four before Ado made two free throws and Nick Weatherspoon made a basket to force another tie at 35.
Silva broke the tie with a free throw before Weatherspoon made a layup with three seconds left to give MSU a 37-36 halftime lead.
--Field Level Media
Mississippi State | South Carolina | |
Quinndary Weatherspoon 18 | Scoring | Frank Booker 25 |
Lamar Peters 3 | Assists | Hassani Gravett 7 |
Abdul Ado 9 | Rebounds | David Beatty 6 |
Abdul Ado 4 | Free Throws Made | Chris Silva 10 |
Tyson Carter 3 | Steals | Wesley Myers 2 |
Abdul Ado 4 | Blocks | Hassani Gravett 1 |
Team | Points | FG% | 3PM-3PA | FTM-FTA | Assists | Rebounds | Blocks | Steals | Turnovers |
Mississippi State | 81 | 51.7 | 7-19 | 14-15 | 12 | 29 | 6 | 7 | 14 |
South Carolina | 76 | 40.0 | 7-24 | 21-27 | 13 | 31 | 2 | 5 | 13 |