The victor has not been identified.
The numbers drawn Tuesday night were 5, 28, 62, 65 and 70, and the Mega Ball was 5.
State lottery officials announced Wednesday that the winning ticket was sold at KC Mart #7 at 303 Lee Vaughn Road in Simpsonville.
The previous record for the largest U.S. lottery prize was a $1.586bn (£1.226bn) jackpot for a Powerball draw in 2016.More news: QUIZ: How much do you remember about Mo Salah's 50 Liverpool goals?
"This is truly a historic occasion".
The victor has the option to discreetly receive their prize in the form of an annual payment, or claim the $877.8 million in cash.
It's just shy of the largest jackpot won in the nation. The odds of winning the jackpot are now 1 in 302,575,350.
It was split three ways by ticket holders in California, Florida and Tennessee. With $1.5bn, you could help no less than three million orphans.
With the jackpot and the other lesser prizes - as little as the face value of a ticket for getting just the Mega Ball right - there were almost 16 million tickets Tuesday night that earned people at least something. North Dakotans are on the opposite end of the spectrum, spending about $44 per year on the lottery, or the lowest average figure among residents of all 50 states.
The record jackpot began growing in July, starting at a comparatively paltry $40 million.More news: WWE moving forward with Crown Jewel event in Saudi Arabia
In case you hadn't already guessed, the massive jackpot is the world's largest ever lottery grand prize.
Each ticket is worth $1 million - before taxes, which are pretty severe.
Mega Millions officially confirmed the victor was in SC when they issued a news release just before 5 a.m. "The next day, I scanned one of my tickets at Speedway and the scanner told me to see the clerk".
It's possible the world will never know who bought the ticket that matches all six numbers in Tuesday night's (Wednesday NZT) drawing.
Powerball will hold its drawing Wednesday night for a jackpot estimated at $620 million or a cash value of $354.3 million.More news: John Kelly's 'Hissy Fits' Hurting Donald Trump - Ex-White House Media Chief