Britain's Kerr breaks Farah's indoor two-mile world record
Kerr charged at the finish to defeat Grant Fisher, who set an American standard in the event with a runner-up finish in 8:03.62.
Farah set the prior world indoor best of 8:03.40 in 2015 at Birmingham, England.
"It was always going to be really tough, small margins," Kerr said. "I wanted to make sure I lose as little energy as possible.
"At 300 to go I was like it's now or never, I'm either not going to make it to that line or I'm hopefully going to break that world record."
Kerr pushed to the line for the victory and the world best, but credited the American runner-up for playing a key role in the mark.
"Grant was so strong. I sat on him for a while," Kerr said. "He did so much of the work so thank you so much for that. And then just closed it down the last 600."
Kerr, a 26-year-old Scotsman, won last year's 1,500m world outdoor title and took bronze in the event at the Tokyo Olympics.