The Gamecocks trailed 3-1 before they scored six runs, four unearned, with two outs in the sixth.
South Carolina had the bases loaded with two outs when Nick Gardiner singled to right off Lane Mestepey (7-4). Landon Powell scored easily, but Melillo collided with LSU catcher Matt Liuzza after the ball bounced under Liuzza's glove.
Umpire Bob Homolka called Melillo safe, but immediately ejected him for not trying to avoid the collision.
South Carolina coach Ray Tanner came out of the dugout to protest, and after the umpiring crew consulted with supervisor Dave Yeast, Homolka's decision was reversed and Melillo was reinstated.
Jim Paronto, secretary-editor to the NCAA Baseball Rules Committee, said in a statement that Homolka initially believed the collision was caused by a flagrant act by Melillo but it was later determined that it was not.
It was the second CWS game in which the collision rule came into play. Georgia shortstop Justin Holmes was ejected for running into catcher Nick Hundley in the Bulldogs' 8-7 win. Holmes was out on the play.
The Gamecocks went on to score four more runs in the inning, three on throwing errors by the Tigers. South Carolina added six more runs in the eighth inning to seal the victory.
South Carolina (51-16) will face the loser of Monday's winner's bracket game between Cal State Fullerton and Miami on Tuesday.
LSU (46-19) was knocked out of the CWS in two games for the second year in a row by South Carolina.
LSU, which had won two of three regular-season meetings between the teams, was dealt its worst loss since being beaten 15-4 by Mississippi State in 2002. It was the Tigers' worst loss in the CWS since Cal State Fullerton beat them 20-6 in 1994.
The teams combined for a CWS-record 34 singles. South Carolina's Steven Tolleson had the game's only extra-base hit, a double in the ninth.
Steve Pearce had four singles for the Gamecocks, and LSU's Will Harris had three.
Gamecocks starter Aaron Rawl (13-4) got the win after scattering 11 hits over 6 2-3 innings.
SC Takes Strange Game Over LSU
Gamecock Anthem Top Stories
Scout 2018: Top 30 for 2018Scout releases its updated Top 30 for the Class of 2018, which is now on the clock leading up to National Signing Day 2018...
Updated Scout 300 Trend Meter For 2017Signing day is Feb. 1 and the updated Scout 300 Trend Meter for the 2017 class takes a look at which schools are trending for each uncommitted member in the Scout 300.
What it's like to lineup in LSU's new offenseLSU offensive coordinator Matt Canada worked quickly on installing his up-tempo offense in Baton Rouge. Reports from practice say it's tired the defense out already at times, but…
Tiger BlitzYesterday at 4:10 PM
Offer in hand, Georgia back targets visitWhen Lyn-J Dixon first heard from Notre Dame he wasn’t sure if an offer would follow. Irish running backs coach Autry Denson has since pulled the trigger, making Dixon think about…
IrishIllustrated.comYesterday at 2:33 PM
2019 RB Hutchinson next star at HavelockHavelock (N.C.) sophomore Cameron Hutchinson is poised to be one of the top 2019 running backs in the state and spoke with Scout.
Scout FootballYesterday at 2:17 PM