
The 24-year-old touched in 8:12.57s to outpace Australian arch-rival Ariarne Titmus, who clocked a personal best 8:13.83s to earn silver ahead of Italy’s Simona Quadarella (8:18.35s).
Ledecky’s young teammate Katie Grimes, just 15, was fourth, signalling she has a big future ahead.
“It’s awesome, I wanted to finish on a really good note.” said Ledecky, who was bent over in exhaustion.
“I’m so happy and I’m in a lot pain too.”
Titmus had dethroned her over both 200m and 400m, but her rival is the undisputed queen of the longer distances, having already won the inaugural 1,500m gold.
She has imposed her will on the rest of the world over 800m since 2012, winning the event at the London and Rio Olympics along with four straight world championship titles.
Ledecky flew out of the blocks and was leading at the first 50m, never relinquishing the lead despite a gallant effort by Titmus to reel her in.
She leaves Tokyo after winning gold over 800m and 1,500m and taking silver behind Titmus in the 400m.
She was also part of the American 4x200m relay team that was second to world record-breaking China.