Hours after Tomas Berdych defeated David Ferrer 6-1, 6-4, 2-6, 6-4 in the first men's quarterfinal, Wawrinka claimed a 2-6, 6-4, 6-3, 3-6, 9-7 victory over Djokovic.
Djokovic won a third consecutive Australian Open last year after beating Wawrinka 12-10 in the fifth set of the fourth round and entered Tuesday's match with a 15-2 career mark versus Wawrinka. Wawrinka hadn't beaten Djokovic since 2006, losing the last 14 meetings.
That string seemed about to continue as Djokovic, No. 2 in the world rankings, breezed through the first set Tuesday but the eighth-seeded Wawrinka stiffened and didn't allow Djokovic a break chance the next two sets. When Djokovic finally got a break opportunity, he cashed it in and evened the match at two sets each.
Djokovic posted a third-game break in the fifth set but Wawrinka quickly answered. They played even until the 16th game when a Djokovic forehand hit the net putting Wawrinka at match point. The next point, Djokovic sent a volley wide left and Wawrinka was in the semifinals.
Wawrinka advances to his second major tournament semifinal; he lost in five sets to Djokovic in last year's U.S. Open.
It was the first loss for Djokovic in Melbourne since the 2010 quarterfinals and first at any tournament since the finals of the U.S. Open, a span of 29 matches. He also saw his string of Grand Slam consecutive semifinals appearances end at 14.
Berdych, the No. 7 seed, took out the third-seeded Ferrer denying him a third semifinals berth in the last four years. Berdych, who lost in the quarterfinals in Melbourne each of the last three years, is in a Grand Slam semi for a fourth time overall but first time at the Australian Open.
Berdych took more than 60 percent of three points on serve and fought off nine of the 12 break chances Ferrer had. He was 5-for-5 in stopping break points in the fourth set. He had five breaks himself.
Berdych had three breaks over the first two sets but Ferrer kept the match alive by winning the three break chances Berdych had in the third set. But he was unable to beat Berdych's serve in the final set. A break in the fifth game gave the advantage to Berdych and he held on from there.
Wednesday's men's quarterfinals feature three of the top six-ranked players in the world. World No. 4 Andy Murray goes against sixth-seeded Roger Federer in the first match while No. 1-ranked Rafael Nadal faces 22nd-seeded Grigor Dimitrov later.
Dimitrov, 22, made it back in the third round of a major for the first time this year. He's 0-3 versus Nadal, although each went the three-set distance. Nadal is a three-time Australian semifinalist, having won the tournament in 2009 and reached the finals in 2012.
Murray had been in the finals each of the last four years in Melbourne, losing in the finals three times, once to Federer and twice -- including last year -- to Djokovic. Federer, a four-time Australian Open champion, has reached the semifinals of the tournament each of the last 10 years.