Reacting to the incredible news, which will no doubt have been bittersweet for Charles, a spokesman for the King and Camilla revealed they were "thrilled".
WATCH: King Charles looks completely heartbroken as royal family sing God Save the King
"Their Majesties are thrilled by Just Fine's success," they said late on Tuesday.
The triumph netted the monarch £7,851 in winnings.
Watch: King arrives for first visit since end of Royal Mourning
Just Fine was trained by Sir Michael Stoute and ridden by Ryan Moore, just as the Queen's most famous winner, Estimate in the Gold Cup at Ascot, was.
Sir Michael said: "A winner for the King. It is great to have done that for him – and he was very impressive."
The King’s racing manager, John Warren, added: "I'm delighted that the King and Queen Consort have had their first winner and they'll be delighted.
"I'm also absolutely thrilled for Sir Michael Stoute, who was probably the longest standing trainer for Her Majesty, and for Ryan Moore, who has put in a big effort as well.
King Charles delighted royal fans during a walkabout
"And for all the team at Sandringham, who rear and go through all the effort to produce the horses all in good shape, so it's a big commitment on everyone’s part to get a result."
John Warren, who was the late Queen's trusted bloodstock and racing adviser for many years, recently spoke about her last days at Balmoral, revealing that she was in "tremendous form" and discussed "her love for her horses right to the very end".
"We sat there for hours over the weekend strategising and making plans going forward," he told the PA news agency ahead of her funeral.
"And I think the nicest thing for me is to know that she was surrounded by her family members.
"She was in such a healthy state of mind and in tremendous form. It's very important to know that she was absolutely, wonderfully switched on."