Wawrinka, seeded ninth in the New York tournament, defeated Czech fifth seed Tomas Berdych in four sets (3-6, 6-1, 7-6 (6), 6-2) at the Louis Armstrong stadium.
It was the same stadium where the night before that fellow countryman Federer crashed out of the Grand Slam tournament at the hands of 19th seeded Spaniard Tommy Robredo.
It took Wawrinka two hours and 47 minutes to prevail over Berdych after losing the first set.
Wawrinka’s victory sets up a match on Thursday against British third seed and defending champion Andy Murray, who defeated Denis Istomin of Uzbekistan in four sets on Tuesday.
The Swiss star said he was playing “better than ever” and the victory marked the first time he has progressed further than Federer in a major tournament.
This tournament also marks the first time that Federer has not scored the best result for a Swiss player in a Grand Slam tournament since 2002.
"It's a different situation, for sure," Wawrinka said, according to a report from Reuters.
"I'm really happy for myself this year, with what I'm doing right now, but I would prefer to have him (Federer) still playing in the tournament,” he said.
"I watched his match yesterday and it was not that good,” Wawrinka said.
“I was sad for him, because he's a good friend and I like when he's winning Grand Slam titles —I hope he will come back stronger."
Murray, who beat Istomin 6-7, 6-1, 6-4, 6-4 in three hours and seven minutes, will prove a formidable opponent for Wawrinka.
However, the Swiss beat Murray in the third round of the US Open three years ago.
“It will be a very tough match,” Murray said of his Swiss opponent.
“He’s played great tennis all year,” he said.
“He has been eight and nine all year and probably going to go higher.”