The 20-time grand slam winner had looked destined for a box-office final against Rafael Nadal in what would have been the great rivals’ first meeting at Flushing Meadows.
But Bulgarian Dimitrov tore up that script with a first ever win over the Swiss, who needed a medical time-out and looked out of sorts throughout a five-set defeat.
Punters on Arthur Ashe for the night session might have feared being short-changed after Serena Williams ran through Wang Qiang in 44 minutes.
After all, Dimitrov had not beaten Federer in any of their previous seven matches, and had taken only two sets off him.
The majority of those defeats came when the Bulgarian was a constant in the top 10, peaking as high as world number three. And coming into New York he had slumped to a lowly 78.
But all was clearly not well with Federer, who hit an unprecedented 60 unforced errors.
He had been flexing his racket arm during the fourth set, and in a rare occurrence the 38-year-old took a lengthy break from court for treatment before the start of the decider. Dimitrov filled the time doing press-ups.
Two breaks of the Federer serve later, Dimitrov was 4-0 up and in unchartered territory.
A Federer hold to 15 momentarily stopped the bleeding, until Dimitrov responded in kind.
Federer made Dimitrov serve out the match, and the 28-year-old did so to love to seal the biggest win of his career, 3-6 6-4 3-6 6-4 6-2.
“It’s been a while since I’ve been on this court so I was nervous in the first set and he served really well,” said Dimitrov.
“I think after the second set I felt I was getting a good stride on my shots. We had a really long game in the fourth set and I wanted to make him stay on court for long as possible.
“For sure he was not at his best at the end. It’s the best of five and anything can happen.”
With Novak Djokovic out Federer knew he had possibly the best chance he will get to win major title number 21.
Little wonder, then, that he cut a disconsolate figure afterwards, admitting his back was playing up.
“I just feel low,” he said. “Just disappointed it’s over because I did feel like I was actually playing really well after a couple of rocky starts.
“It’s just a missed opportunity to some extent that you’re in the lead, you can get through, you have two days off after. It was looking good.”
In the last four Dimitrov will face Daniil Medvedev, who continued to wind up the US Open crowd after knocking out Stan Wawrinka to reach his first grand slam semi.
The Russian fifth seed remains public enemy number one among the Flushing Meadows fans after flipping them a ‘visual obscenity’ during his win over Feliciano Lopez last week.
Medvedev needed extensive treatment to his thigh during the first set, which he eventually took on a tie-break.
Wawrinka, the 2016 champion, must have felt he might have another retirement on his hands, having seen previous opponent Novak Djokovic throw in the towel two nights earlier.
But despite the crowd once again cheering Wawrinka’s every point to the rafters, it was Medvedev who ran out the 7-6 (6) 6-3 3-6 6-1 winner.
The 23-year-old’s goading of the crowd in his on-court interviews has been a feature of this tournament, and he concluded his latest one by saying: “So many people support me, so many people don’t like me.
“I can just say, I try to be myself guys. I have to say, sorry guys, and thank you!”
Medvedev earlier explained his injury issues, revealing he felt he may not be able to finish the match.
He said: “The match was really strange. I had really big pain in my quadriceps and I didn’t feel I could continue in the first set.
“I feel really strange about this match but I’m happy to be in my first major semi-final. Before the match I was feeling perfect, and all these tapes were for protection.
“In the first game of the match I pulled my quadriceps. I took a painkiller and by the fourth set I was feeling normal. I’ll see how I feel in the morning and try my best to be fit for the semis.”