Mega Million's website did not list where, exactly, the winning ticket was sold, although the New Jersey Lottery tweeted that the ticket was sold in Riverdale, Morris County.
The lucky numbers were 59 - 46 - 28 - 11 - 31, Mega Ball 1.
The jackpot winner will receive the fourth largest jackpot in the history of the game. No one has matched all six numbers drawn since January.
No one lucked out in Tuesday's drawing, so the prize jumped from $458 million to $521 million with a $317 million cash option.
The odds of picking the correct numbers on five white balls and one yellow ball in the Mega Millions game are one in 259 million. For Powerball, it's one in roughly 292 million.
Revamps to the country's two big lottery games in recent years decreased the odds of picking all the numbers needed for the top prize, though officials point out it has increased the number of winners who score smaller prizes that range from $1 million to $5 million, depending on the game.
Mega Millions tickets are sold in 43 states plus the District of Columbia and the U.S. Virgin Islands.
Top 10 largest US Lottery Jackpots
1. $1.6 billion, Powerball, Jan. 13, 2016 (three tickets, from California, Florida, Tennessee)
2. $758.7 million, Powerball, Aug. 23, 2017 (one ticket, from Massachusetts)
3. $656 million, Mega Millions, March 30, 2012 (three tickets, from Kansas, Illinois and Maryland)
4. $648 million, Mega Millions, Dec. 17, 2013 (two tickets, from California and Georgia)
5. $590.5 million, Powerball, May 18, 2013 (one ticket, from Florida)
6. $587.5 million, Powerball, Nov. 28, 2012 (two tickets, from Arizona and Missouri)
7. $564.1 million, Powerball, Feb. 11, 2015 (three tickets, from North Carolina, Puerto Rico and Texas)
8. $559.7 million jackpot, Powerball, Jan. 6, 2018 (one ticket, New Hampshire)
9. $536 million, Mega Millions, July 8, 2016 (one ticket, from Indiana)
10. $487 million, Powerball, July 30, 2016 (one ticket, from New Hampshire)