A stunning winner from yards behind the baseline secured a 7-6 (8/6), 5-7, 6-4, 3-6, 8-6 fourth-round triumph for 2015 champion Wawrinka after five hours and nine minutes in sweltering heat on Court Suzanne Lenglen.
The 34-year-old has a 23-3 losing head-to-head record against close friend and fellow Swiss Federer, who saw off Argentinian world number 68 Leonardo Mayer 6-2, 6-3, 6-3 earlier in the day.
"It's incredible, lots of emotions. Thanks to all the fans for staying and (the) support," said Wawrinka after the third longest match in the last 20 years at the French Open.
"It's for these kind of emotions that I live for after coming back from injury."
It is the first time Wawrinka has reached a Grand Slam quarter-final since losing to Rafael Nadal in the 2017 Roland Garros final, and completes an amazing turnaround from 12 months ago.
Last year, the three-time Grand Slam champion, following injury struggles, lost in the first round to Guillermo Garcia-Lopez and dropped out of the world's top 250.
The 20-year-old Tsitsipas missed out on the chance for a rematch with Federer, having beaten the 20-time major title winner in the Australian Open fourth round earlier this year.
Wawrinka, seeded 24th, saved 22 of the 27 break points he faced, including all eight in the final set as sixth seed Tsitsipas pushed for victory to no avail.
"Worse thing in tennis. It's the worst feeling ever. Especially when you lose. You don't want to be in my place," Tsitsipas said.
- Evergreen Federer marches on -
Federer, the 2009 champion in Paris, is the oldest man to make the quarter-finals of a Grand Slam tournament since Jimmy Connors at the 1991 US Open.
"It's fabulous that I can spend this time in Paris," said Federer who last played the tournament in 2015 when he lost in the quarter-finals to Wawrinka.
"I was prepared for the worst scenario, losing in the first round in three sets. But I am super happy with my performance."
Federer will be playing in his 54th quarter-final at a Slam, cementing his place on top of the all-time men's list.
Federer, who is yet to drop a set in the tournament, said he still remembers his last-eight loss to Wawrinka in Paris four years ago.
"I have a bad memory of it. Stan beat me in three sets with his terrible shorts!"
Reigning champion Nadal continued his bid for a record-extending 12th Roland Garros title by beating Grand Slam debutant Juan Ignacio Londero 6-2, 6-3, 6-3.
World number 78 Londero had his moments, breaking Nadal when 4-1 down in the third set, but the 17-time major champion always looked too strong, powering 40 winners past the Argentinian.
Nadal will face either Japanese seventh seed Kei Nishikori or home favourite Benoit Paire in his 38th Grand Slam quarter-final, after their match was suspended due to darkness with Nishikori leading 6-2, 6-7 (8/10), 6-2.
"It's an incredible feeling to be in another quarter-final at this tournament which has been the most special of my career," said Nadal.
The Spaniard, who turns 33 on Monday, has only been defeated twice in his French Open career and has a 10-2 record over Nishikori while he has yet to lose to Paire in four matches.
- Stephens beats Muguruza -
In a wide-open women's draw after the shock exits of top seed Naomi Osaka and 23-time Grand Slam champion Serena Williams on Saturday, last year's runner-up Sloane Stephens laid down a marker with a 6-4, 6-3 win over 2016 champion Garbine Muguruza.
The American, a former US Open winner, needed five match points to get over the line.
Seventh seed Stephens will take on Johanna Konta for a place in the semi-finals, after the British number one saw off Croatia's Donna Vekic 6-2, 6-4 to reach her first Grand Slam quarter-final since Wimbledon in 2017.
Czech teenager Marketa Vondrousova reached her maiden major quarter-final by thrashing Anastasija Sevastova 6-2, 6-0.
She will face 31st seed Petra Martic for a semi-final spot, after the Croatian came from a set down to beat Estonia's Kaia Kanepi 5-7, 6-2, 6-4.
At least five women will reach their first Roland Garros quarter-final this year, the first time that has happened since 2001.