Kentucky had only five hits on the day, but three of them left Cliff Hagan Stadium, including Hairston's game-winner on a 2-1 count leading off the 12th. JaVon Shelby hit a two-run homer in the third, his SEC-leading 11th of the season, and Zach Reks had a game-tying solo shot in the eighth to produce all but one of the Cats' runs on the day.
It marked the first career walk-off hit for Hairston, a senior for Lexington's Tates Creek High School. It was the second walk-off homer for the Cats this season, who defeated Alabama in April on a grand slam by Riley Mahan.
Freshman right-hander Sean Hjelle (4-0) was another hero for Kentucky on its longest game of the season, pitching four shutout innings of two-hit relief with five strikeouts to give his team a chance to win. The 6-foot-11 Hjelle worked out of a jam with runners on second and third in the 11th inning by striking out the side.
After taking two out of three against the league-leading Gamecocks, UK (29-19, 13-11 SEC) now has series wins over teams ranked No. 1 (Florida) and No. 2 (South Carolina) in various national polls. The Cats had been reeling in recent weeks, dropping their three previous league series to Vanderbilt, Arkansas and Auburn.
For South Carolina (36-11, 16-7 SEC), it continued a trend of nightmarish trips to Lexington. The Gamecocks have lost six of their last seven series in the Bluegrass State.
Tyler Johnson (1-2) took the loss for South Carolina, serving up the decisive home run to Hairston. Adam Hill started for the Gamecocks, allowing three runs on two hits and three walks over five innings on the mound.
The Gamecocks out-hit the Cats 14-5, including three-hit days for Dom Thompson-Williams and Madison Stokes, but found themselves handcuffed by the UK staff when it mattered most. Kentucky starter Kyle Cody worked around eight hits and three walks to allow only one earned run over 5.2 innings before handing it off to five relievers.
Kentucky returns to action on Tuesday at Indiana in a 6 p.m. ET matchup prior to next weekend's visit to Ole Miss.