British third seed Murray, seeking his first Grand Slam title after four runner-up finishes, defeated Canadian 15th seed Milos Raonic 6-4, 6-4, 6-2 in a night match at Arthur Ashe Stadium.
The 25-year-old Scotsman, who reached his eighth Grand Slam quarter-final in a row, will play for a semi-final berth against Croatian 12th seed Marin Cilic, who beat Slovakian Martin Klizan 7-5, 6-4, 6-0.
Murray is 6-1 lifetime against Cilic but the only loss came in the fourth round of the 2009 US Open.
"Tough match. He's a tough player," Murray said. "He works extremely hard. He has a solid game. I will have to work extremely hard to beat him."
Top seed Federer, seeking an unprecedented 18th Grand Slam title and record sixth US Open crown, advanced by walkover when American Mardy Fish withdrew from their match over health concerns.
"I am really sorry for Mardy," Federer said. "I just want to wish him a speedy recovery. We all want to see him back on tour soon."
Federer has earned 38 career quarter-final Grand Slam appearances, three shy of the Open-era record 41 achieved by American Jimmy Connors.
The 31-year-old Swiss star reached a last-eight matchup with Czech sixth seed Tomas Berdych, who dispatched Spanish 11th seed Nicolas Almagro 7-6 (7/4), 6-4, 6-1. Berdych has lost 11 of 15 career meetings to top seed Federer.
"It will be a tough match against Tomas," Federer said. "We have played many times in the past and he has always been a tough opponent. I will have to continue to serve well and dictate the points."
Murray broke Raonic with a drop volley winner for a 5-4 lead and held to take the first set after 36 minutes. In the second set, Murray broke for a 3-2 edge when Raonic netted a forehand and held serve from there to seize command.
Raonic, trying to become the first Canadian man in a Grand Slam last eight in the Open era, surrendered breaks in the third and fifth games of the final set.
Murray, who never faced a break point, held serve to end matters after two hours with a service winner.
"I used a lot of variation," Murray said. "Milos has a huge game, massive serves. I guessed right a couple times, got lucky and was able to hit a few passing shots on him.
"I was just trying to react as fast as I could. Sometimes they fly past you and sometimes you get a racquet on it. Tonight I got a racquet on it."
Fish, 30, missed two months earlier this year with a heart problem after his heart rate increased to three times its normal resting pace. He underwent a cardiac catheter ablation in Los Angeles on May 23 to treat his condition.
But his statement about the withdrawal did not specify a reason.
"I regret that I have to withdraw from the US Open for precautionary measures. I was reluctant to do so, but am following medical advisement," Fish said. "I had a good summer and look forward to resuming my tournament schedule in the fall."
Federer, who won his 17th Grand Slam title in July at Wimbledon, has not dropped a set in the Flushing Meadows fortnight.
"I probably need to have something more than 100 per cent," Berdych said.
Berdych, who took only two hours to reach his first US Open quarter-final, has won three of his past six meetings with Federer, including a US Open tune-up last year at Cincinnati and a 2010 Wimbledon quarter-final.
Berdych finally reached the US Open last eight after 10 tries with his 200th career hardcourt triumph. He joined Petr Korda and Ivan Lendl as the only Czech men in the Open era to have reached the quarter-finals at all four Grand Slams.
"It helps my confidence," Berdych said.
Almagro, 27, hopes to replace injured Rafael Nadal on the Spanish Davis Cup team that will host the United States next week in a semi-final tie.
"Knowing Rafa like I know him, he will be climbing the walls," Almagro said. "The most important thing is that he will have time to recuperate so he will come back the same player that he was."
Berdych, whose best Grand Slam result was a 2010 Wimbledon final loss to Nadal, improved to 7-3 lifetime against Almagro and snapped a five-game losing streak to top-20 rivals dating to a Rome victory over Almagro last May.
Cilic took his eighth victory in a row over a left-handed foe.
"I like to play them," he said. "That game suits me. I play well from both sides so it's hard for them to find an opening."
Three-time champion Serena Williams stormed to a double bagel 6-0, 6-0 rout of Czech Andrea Hlavackova to reach her 10th US Open quarter-final in a ruthless display of her title credentials.
The 30-year-old American allowed the world number 82 just eight points on her serve and finished the last-16 clash with 31 winners against just seven unforced errors, backing up her 57-minute win with eight aces.
Williams, a 14-time Grand Slam title winner, and the reigning Wimbledon and Olympic champion, has dropped just 12 games in four matches at the Open this year.
She hasn't lost a game in her last three sets played while Monday's mauling was the fifth time in her career she had handed out a double bagel.
Williams will on Wednesday face Ana Ivanovic for a place in the semi-finals after the Serb 12th seed defeated Bulgaria's Tsvetana Pironkova 6-0, 6-4.
The other quarter-final will feature Italian compatriots, best friends and doubles partners Sara Errani and Roberta Vinci battling for a semi-final spot.
Errani, the 10th seed, defeated last year's semi-finalist, German sixth seed Angelique Kerber 7-6 (7/5), 6-3, while Vinci saw off Polish second seed Agnieszka Radwanska 6-1, 6-4.
It will be the first time two Italian women have made the last eight at the same Grand Slam.
Tuesday's first quarter-finals see top seed Victoria Azarenka facing defending champion Samantha Stosur while 2006 winner Maria Sharapova takes on France's Marion Bartoli.
"Andrea played really well," Williams insisted of her outclassed opponent, who departed the singles tournament $120,000 richer for making the fourth round of a Grand Slam for the first time.
"She never gave up. She's such a great fighter. But I played really well today, I tried to stay relaxed and do what I do."
Williams dismissed suggestions that the 2012 title was already a formality.
"I think my road has been a journey. I don't think anything's easy. I don't think anything is easy," she said.
"I never play a person and say, 'Oh, that was an easy opponent.' No, I have never done that. Everything takes some type of match and mental toughness."
Williams has now reached a 34th quarter-final at a major.
Ivanovic booked her first Grand Slam spot in four years — and first ever at the US Open — by defeating Bulgaria's Tsvetana Pironkova 6-0, 6-4.
Ivanovic has never taken a set off Williams in her three defeats; two of those losses came at the US Open in 2006 and 2011.
The 24-year-old Ivanovic's last major quarter-final came on the way to her one and only Grand Slam triumph at the 2008 French Open.
"I hardly made any mistakes in the first set but she is a tough opponent and I knew she would come back in the second set," said Ivanovic, after her 71-minute win, where she finished with 28 winners and 21 unforced errors.
"It's amazing to be in my first quarter-final at the US Open."
Errani, 25, the French Open runner-up, made her first US Open quarter-final in what has become her best year on the tour which has brought her four singles titles and seven doubles trophies.
"It was a difficult fight today," said Errani. "The first set was one hour and 15 minutes. It was very tactical."
Vinci had lost all four previous meetings with Wimbledon finalist Radwanska, who has yet to get beyond the fourth round in New York.
The 29-year-old will be playing in a Grand Slam quarter-final for the first time.
"I just closed my eyes and played. The ball was big enough," said Vinci.
"I am happy to play Sara. She is my best friend and I am happy she won today."