Day carded a final round of 67 to become the first player to finish a major on 20 under par, beating the previous record of 19 under set by Tiger Woods in the 2000 Open at St Andrews.
The 27-year-old was in tears even before tapping in for par on the 18th, where he was embraced by his caddie and mentor Col Swatton, son Dash and wife Ellie, who is pregnant with the couple’s second child.
Spieth was looking to become only the third player after Woods and Ben Hogan to win three majors in a season, but a closing 68 meant he finished three shots behind and had to settle for overtaking Rory McIlroy to become the second youngest world No 1 behind Woods.
The 22-year-old also finished a remarkable 54 under par for the year’s four majors, one better than Woods in 2000 when he won the US Open, Open Championship and US PGA.
South African Branden Grace followed his fourth place in the US Open with third place on 15 under, with England’s Justin Rose another shot back and Anirban Lahiri sharing fifth with Brooks Koepka, the best major finish by an Indian player.
Just two months ago Day collapsed due to an attack of vertigo during the US Open, slumping to the ground on the final hole of his second round at Chambers Bay.
But after receiving treatment from paramedics he not only completed the hole, but shot 68 on Saturday to share the lead and went on to finish ninth, despite almost pulling out on several occasions.
Day was diagnosed as suffering from Benign Positional Vertigo caused by an infection which had attacked and damaged nerves in his ear, and is now taking anti-viral medication, but declared himself fit to return at the Open and finished with 12 straight pars in the final round, leaving a birdie putt on the 18th to get into the play-off agonisingly short.
That made it nine top-10 finishes in his last 19 majors but the Queenslander was not going to be denied on this occasion, despite the threat posed by a chasing pack containing Spieth, Rose and 2010 champion Martin Kaymer.
Day began the final round with a two-shot lead over playing partner Spieth, although the strongest initial challenge came from Grace, who picked up a shot on the third and then rolled in a hat-trick of birdies from the fifth.
Day birdied the par-5 second and then matched Grace’s hat-trick, the last coming from 45 feet on the seventh and meaning he became the quickest player in major history to reach 19 under par.
However, the crucial hole was arguably the ninth, where Day hit his second shot fat and came up 50 yards short of the green, but pitched to nine feet and holed for par after Spieth missed his own par attempt after tangling with the rough off the tee.
Grace had shared the lead with Spieth with three holes to play in the US Open in June, but drove out of bounds on the 16th to effectively end his chances.
This time the 10th hole was to prove costly for the 27-year-old, who ran up a double bogey after hitting his second shot over the green and needing two attempts to find the putting surface.
That left playing partner Rose to briefly become Day’s closest challenger, the former US Open champion carding his fourth birdie of the day on the 11th to get within two shots. But just two holes later it was Rose’s turn to take a costly double bogey after finding an almost unplayable lie in a greenside bunker.
Day smashed a drive of 382 yards down the par-5 11th and, after finding the green with a pitching wedge, two-putted for birdie. And although Spieth birdied the 13th to close within three, Day responded with another birdie on the 14th to reach 20 under par and enjoy a four-shot lead with four to play.
A bogey on the 15th briefly gave Day pause for thought, but after matching Spieth’s birdie on the 16th and finding the heart of the green on the treacherous 17th, the Wanamaker Trophy was effectively secure in his hands.