BBC NEWS - St Leger: Galileo Chrome wins final 2020 Classic at Doncaster
The 27-year-old trainer, son of the legendary Aidan, won as a jockey in 2013 and is only the second man, after Harry Wragg, to triumph as both.
It was jockey Tom Marquand's first Classic win, having only secured the ride on Friday after Shane Crosse tested positive for Covid-19.
The 4-1 Galileo Chrome was a neck clear of Berkshire Rocco (16-1).
Pyledriver (9-2) was third while Frankie Dettori, seeking a seventh St Leger for both himself and Joseph's father Aidan O'Brien, finished fourth on the 5-2 favourite, one and a half lengths adrift.
Willie Muir's Pyledriver had captured public imagination after going unsold as a foal but winning his first race at 50-1 last year.
Having added three more wins since, he looked set for a bold challenge in the big race with Muir's son-in-law Martin Dwyer on board, seeking to bring the trainer a first Classic, before fading on the far side and eventually finishing a length back.
Marquand, who was replaced by Dettori on English King for this year's Derby, weaved his mount expertly through the centre of the field on the good ground on a breezy afternoon over one mile six and a half furlongs.
He held off a strong finish from Berkshire Rocco, whose trainer Andrew Balding was seeking a second Classic of the season, having won the 2000 Guineas with Kameko in June.
"My heart goes out to Shane Crosse," Marquand said graciously. "I can't say how bad I feel for him because we've all been in situations where things haven't gone our way and we're both relatively young, so I can relate and he'll be sat at home in pieces, no doubt.
"I guess in racing it all comes back round. No doubt he'll have his time and I look forward to seeing him do it. "To have my first Group One winner on UK soil in the St Leger for Joseph O'Brien, who when I was growing up was one of the best jockeys in racing and is now training and doing a similar job - it's mind-blowing to get an opportunity like this."
Meanwhile, Magical, trained by Aidan O'Brien and ridden by Seamie Heffernan, won the Irish Champion Stakes at Leopardstown ahead of 8-13 favourite Ghaiyyath, the world's highest-rated horse.
Charlie Appleby's Ghaiyyath, who had won all four of his races this year, was overhauled in the final furlong and finished three quarters of a length adrift as Magical became only the second horse to win the race back-to-back.