Five-time champion Federer reached his tenth US Open quarterfinal in the last 11 years with a comfortable 6-4, 6-3, 6-2 win over Spain's Roberto Bautista Agut while Monfils, the 20th seed, reached his second New York last-eight stunning seventh-seeded Grigor Dimitrov 7-5, 7-6 (8/6), 7-5
Federer, the 17-time Grand Slam winner, leads Monfils 7-2 in career meetings, including their most recent clash in Cincinnati last month.
"It was a tough three-setter in Cincinnati," said Federer after winning his 25th night-time match.
"Gael has been playing some great tennis, he's always very entertaining," he said.
" I'm sure we'll see lots of retrieving by him and attacking by me."
Federer was barely troubled by Bautista Agut, the 17th seed who was trying to make a Grand Slam quarterfinal for the first time.
He broke in the third and fifth games for a 4-1 lead and despite surrendering one of the breaks in the eighth game, two successive aces sealed the opening set and there was no looking back for the 33-year-old.
Crowd favourite Monfils overcame a dramatic loss of composure in the second set to reach his second US Open quarterfinal, four years after his first.
"It's my first ever win on the Ashe stadium which is great," said Monfils, who turned 28 on Monday and whose best performance at a major remains his run to the semifinals at the 2008 French Open where he was defeated by Federer.
"I love to play in New York. There is so much energy and it helps me deliver my game."
Wimbledon semifinalist Dimitrov, 23, was hoping to reach his third quarter-final at the majors this year but despite occasional breath-taking shot-making, he was undone by 38 unforced errors.
Monfils, who hasn't dropped a set at the tournament, raced through the first set on the back of a break for a 6-5 lead.
The Frenchman was another break to the good at 4-2 in the second before he got embroiled in a brief war of words over distractions on the court.
Still seething, the Parisian surrendered a break point by not returning the ball in the eighth game.
But he bounced back in impressive style, saving two set points in the tiebreak before winning four points in a row to open a two sets to love lead.