In the 10th and last discipline, the 1,500 metres, he needed the help of one of his rivals to drag him around the final lap in a fast enough time.
Competing in his first decathlon for two years, Eaton had to run four minutes 18.25 seconds to score the 824 points required to break the world record.
“I knew with 300 metres to go that I was behind, and I said, ‘Oh crap! I better go’,” Eaton told reporters.
“I could see the Algerian Larbi (Bouraada) in front of me and I used him. I could tell, he sped up. I caught up again and he sped up again. So I thank him for that.”
Eaton stopped the clock at 4:17.52 to score 829 points and break his old mark, set in 2012, by six points.
The silver medal went to Canada’s Damian Warner with a national record 8,695 points and Rico Freimuth of Germany took bronze with 8,561.
There had been little doubt through the second day that Eaton would win gold and it was all about whether he could better the record.
The Olympic gold medallist had run 45.00 seconds in the 400 metres on Friday, the fastest ever by a decathlete during a multi-event.
Eaton finished the first day on 4,703 points, well ahead of medal challengers Warner Freimuth and the second German, Kai Kazmirek.
His procession towards the gold continued on Saturday with a 13.69-second 110m hurdles, a 43.34-metre discus throw, 5.20 metres in the pole vault and a 63.63-metre javelin throw.
“In the hurdles, it was really hard to get over nine and 10. I thought, ‘Jeez, I’m getting old.’ It was just kind of difficult,” Eaton said.
“The world record thing? I knew I was on track, and I was just trying to have fun. But I got to the pole vault, and I was getting tired and I thought ‘I don’t know if this thing is possible’,” he added.
“Then in the javelin I got all fired-up. Where do you find that inner strength, I don’t know, but the important thing is to search for it, to dig, any way. “In the 1,500, I was having doubts, I didn’t know if I could do it. It’s like two years since I did a decathlon like this, and it’s different from when I did the record in Eugene. This was 12-hour days.”
With one day of the meeting to go, Eaton’s is the only world record to be broken at the Beijing championships.
Eaton is married to Canadian heptathlete Brianne Theisen- Eaton, who won the world silver medal here earlier this week.
(Reporting by Steven Downes, Editing by Ed Osmond)