The 38-year-old Federer took a rare-for-him medical timeout after the fourth set, leaving the court with a trainer. It was not immediately clear what might have been wrong with Federer, although he did appear to be flexing his back after some points.
When play resumed after a break of nearly 10 minutes, Federer's form never picked up. He finished with 61 unforced errors, 33 on the forehand side. Federer had been 7-0 against Dimitrov, taking 16 of their previous 18 sets.
Federer would have been the oldest Grand Slam semifinalist since Jimmy Connors was 39 at Flushing Meadows in 1991. He also was trying to add to his totals of five U.S. Open championships and 20 major trophies in all.
Instead, Dimitrov advanced to his third major semifinal, first in New York. He will face No. 5 Daniil Medvedev on Friday.
Roger Federer and Grigor Dimitrov are headed to a fifth set in their U.S. Open quarterfinal.
Federer won the first and third sets. Dimitrov took the second and fourth.
They have been playing more than 2½ hours.
Federer took a medical timeout after the fourth set and left the court with a trainer. It wasn't immediately clear what might have been wrong with Federer.
The 38-year-old Federer is trying to become the oldest Grand Slam semifinalist since Jimmy Connors was 39 at Flushing Meadows in 1991.
The winner will meet No. 5 seed Daniil Medvedev on Friday for a spot in the final.
Serena Williams was not troubled one bit by the right ankle she rolled in her previous match. Didn't get much resistance from her opponent, either.
Looking as dominant as can be, Williams moved just fine and powered her way into the U.S. Open semifinals by overwhelming 18th-seeded Wang Qiang of China 6-1, 6-0 in a mere 44 minutes to move closer to a 24th Grand Slam singles trophy.
Williams had rolled her ankle during her fourth-round match but that was not an issue in this one.
She grabbed the first five games in about 15 minutes. Then, after dropping one game, Williams collected the next 11 points in a row and every remaining game.
Just one indication of how lopsided this was: Williams finished with 25 winners to zero for Wang, who was playing in her first major quarterfinal.
Williams is a six-time champion at Flushing Meadows and this was her 100th match win at the U.S. Open.
She faces No. 5 seed Elina Svitolina for a berth in the final.
Daniil Medvedev is continuing his hard-court roll right into the U.S. Open semifinals after beating Stan Wawrinka 7-6 (6), 6-3, 3-6, 6-1.
The No. 5 seed reached the final four at a major tournament for the first time and improved his tour-leading total to 49 victories this year. He reached the final in three straight tournaments on hard courts leading into the U.S. Open, winning the last one.
Medvedev, 23, had his legs treated twice in the first set but played through the pain to become the youngest semifinalist at the U.S. Open since Novak Djokovic was also 23 in 2010.
He will play five-time champion Roger Federer or unseeded Grigor Dimitrov in the semifinals.
Wawrinka eliminated the defending champion Djokovic in the fourth round but fell short of getting back to the semifinals for the first time since winning the 2016 U.S. Open title.
Elina Svitolina reached the U.S. Open semifinals for the first time with a 6-4, 6-4 victory over Johanna Konta.
The No. 5 seed followed her first appearance in the final four of a major at Wimbledon in July by getting right back there at Flushing Meadows, where she will face either six-time champion Serena Williams or Wang Qiang.
The players exchanged three straight breaks of serve in the third set but Svitolina played a cleaner match than Konta, who made 35 unforced errors compared to Svitolina's 13.
The 16th-seeded Konta was trying to reach her first U.S. Open semifinal. She has reached that round in the other three major tournaments.
Roger Federer resumes his bid for his first U.S. Open title in 11 years with a quarterfinal under the lights at night against unseeded Grigor Dimitrov.
The 38-year-old Federer is trying to become the oldest male Grand Slam semifinalist since Jimmy Connors was 39 during his 1991 run at the U.S. Open.
Federer's potential path to the final no longer includes nemesis Novak Djokovic — or anyone else who ever has beaten him on a hard court, for that matter.
That's because Federer is a combined 26-0 on that surface against the players left on his half of the bracket. He is 6-0 on hard courts against Dimitrov, 17-0 against Stan Wawrinka and 3-0 against Daniil Medvedev.
Wawrinka, the 2016 champion in New York, takes on the fifth-seeded Medvedev in the afternoon Tuesday.
Serena Williams will test her right ankle after rolling it and tries to return to the semifinals when she plays Wang Qiang. Elina Svitolina meets Johanna Konta in another women's quarterfinal.
More AP Tennis: https://www.apnews.com/apf-Tennis and https://twitter.com/AP_Sports