The Swiss second seed, one shy of tying the all-time record Slam last-eight streak belonging to Jimmy Connors, defeated Austrian 13th seed Jurgen Melzer 6-3, 7-6 (7/4), 6-3 in a night match at Arthur Ashe Stadium.
"I'm happy and really relieved I'm through," Federer said. "I haven't lost a set so obviously I'm really happy. I'm finding a way to win, playing the right way, playing aggressively.
"I've worked extremely hard. It's nice to see it paying off."
Federer, who last failed to reach a Grand Slam quarter-final at the 2004 French Open, will next face Swedish fifth seed Robin Soderling, who fired 15 aces in dispatching Spanish 21st seed Albert Montanes 4-6, 6-3, 6-2, 6-3.
"It's not going to be easy," Federer said. "He's a great player. He's having a great last couple of years. He has always been a dangerous player but now he has been able to do it consistently."
Soderling has a 1-12 record against Federer after winning their most recent meeting in this year's French Open quarter-finals to snap Federer's astonishing run of 23 Grand Slam semi-finals in a row.
"I think anybody can beat Roger, anybody at least in the top 10," Soderling said. "He had a great year, but he had some losses this year."
Adding to the rivalry is the fact that French Open runner-up Soderling was ousted from his first US Open quarter-final last year by Federer.
"I will have to play really well to beat him," Soderling said. "I know his game. He knows mine. I'm pretty sure I know how to play to have a chance to win but it's going to be extremely difficult."
Serbian third seed Novak Djokovic ousted US 19th seed Mardy Fish 6-3, 6-4, 6-1 to book a semi-final date with French 17th seed Gael Monfils, who beat countryman Richard Gasquet 6-4, 7-5, 7-5.
"If he starts playing well he can beat anyone because he is so fast and so athletic and strong that he can get a lot of balls back," Djokovic said of Monfils. "I just have to be ready and patient and wait for my chances."
Monfils is 0-4 against Djokovic but pushed him to five sets in round one of the 2005 US Open, to three sets at the 2008 Beijing Olympic quarter-finals and into a third-set tie-breaker before dropping last year's Paris indoor final.
"I have revenge to take. He won against me at home," Monfils said. "This time I hope to win."
Djokovic was the 2007 US Open runner-up and lost in the semi-finals the past two years, all three defeats coming at the hands of Federer, again a possible semi-final foe.
Federer, who also ousted Melzer from the fourth round at Wimbledon, saved the only two break points of the second set then won the last three points of the tie-breaker to seize command of the match.
After an early exchange of breaks in the third set, Federer denied Melzer on four break points in the fifth game to hold, then broke for a 4-2 edge, saved three more break points to hold for a 5-2 edge and held again to win the match.
Montanes won the only break point he managed against Soderling all day with a forehand winner in the fifth game of the first set to win it, but an errant backhand by the Spaniard handed Soderling the only break of the second set.
Soderling seized command from there, dominating the third set and breaking in the fifth and final games of the last.
"I played very well the longer the match went," Soderling said. "After the first set I played better. It was a good match for me."
Fish surrendered two early breaks to drop the first set and another in the fifth game of the second set, but responded in the next game by earning three break points, only to see Djokovic save them all and hold to 4-2.
"Whenever I had a chance I used it. I was returning really well, making him play an extra shot, and I was serving well," Djokovic said.
Djokovic held twice more to claim the second set and broke Fish three times in the third to improve his record to 6-0 against Fish.
"Novak played great," Fish said. "He kicked my butt."
Monfils became the first Frenchman in the US Open's last eight since 2000.
Gasquet double faulted to give Monfils the only first-set break in the third game and surrendered a decisive break to Monfils in the 11th game of set two. Gasquet led 5-2 in the third but Monfils won the last five games of the match.
"My plan was to try to break him physically and break him in the head," Monfils said. "I think I did pretty good."