The Russian fifth seed remains public enemy number one among the Flushing Meadows fans after flipping them a 'visual obscenity' during his win over Feliciano Lopez last week.
Medvedev needed extensive treatment to his thigh during the first set, which he eventually took on a tie-break.
Wawrinka, the 2016 champion, must have felt he might have another retirement on his hands, having seen previous opponent Novak Djokovic throw in the towel two nights earlier.
But despite the crowd once again cheering Wawrinka's every point to the rafters, it was Medvedev who ran out 7-6 (6) 6-3 3-6 6-1 winner.
The 23-year-old's goading of the crowd in his on-court interviews has been a feature of this tournament, and he concluded his latest one by saying: "So many people support me, so many people don't like me.
"I can just say, I try to be myself guys. I have to say, sorry guys, and thank you!"
Medvedev earlier explained his injury issues, revealing he felt he may not be able to finish the match.
He said: "The match was really strange. I had really big pain in my quadriceps and I didn't feel I could continue in the first set.
"I feel really strange about this match but I'm happy to be in my first major semi-final.
"Before the match I was feeling perfect, and all these tapes were for protection.
"In the first game of the match I pulled my quadriceps. I took a painkiller and by the fourth set I was feeling normal.
"I'll see how I feel in the morning and try my best to be fit for the semis."