Wawrinka came from two sets down but could not win the decider as Raonic won 6-4 6-3 5-7 4-6 6-3 to book his place in the quarter-finals.
The Swiss was on course to face Andy Murray in the semi-finals in Melbourne but the combination of an in-form Raonic and poor health ensured his tournament ended early.
“I think I honestly come from too far, I’ve been sick since 10 days now,” Wawrinka said. “I was still trying to get into the second week and couldn’t really be at my top. When you play a top guy like Milos, it’s difficult. You need to be 100% to have a chance to beat him. Today he pushed from the beginning. He was there. That’s it. He was better.”
Raonic now faces Frenchman Gael Monfils. Monfils beat Russian Andrey Kuznetsov in four sets.
Spain’s David Ferrer and Britain’s Andy Murray will also meet in the last eight after they recorded straight-set wins over John Isner and Bernard Tomic respectively.
Murray beat Australia’s Bernard Tomic 6-4 6-4 7-6 (7/4) on Monday.
“It was a tricky match,” Murray said.
“I got up a break I think in all of the sets. Each time he obviously got it back. So there were quite a few momentum shifts in all of the sets. Luckily he missed a few easy forehands in the tie-break, and that helped me out in the breaker. It helped me get it done in straight sets.”
Chinese qualifier Shuai Zhang has gone from Samantha Stosur’s ball-girl to Australian Open quarter-finalist.
Zhang knocked out American Madison Keys 3-6 6-3 6-3 to book a last-eight match-up with Britain’s Johanna Konta and continue one of tennis’ greatest under-dog stories.
The world number 133 arrived in Melbourne on the back of 14 consecutive first round exits and having never one a single match in the main draw of a grand slam.
After beating Keys, who was struggling with an injury to her left leg, Zhang thanked Australia’s Stosur in the crowd and said: “I’ll be your ball-girl forever.”
Zhang is on course for a potential semi-final against the much-fancied Victoria Azarenka, who enjoyed another comfortable win, this time seeing off Czech Barbora Strycova 6-2 6-4.
Azarenka’s 6-2 6-4 victory means she is yet to drop a set in her opening four matches. “I was more focused on staying focused because she’s a type of player that throws you a lot off your rhythm,” Azarenka said.
“I was just trying to focus more on execution and being aggressive and follow my game plan from the first point to the last.”
Azarenka will now play Germany’s Angelique Kerber. Kerber beat her compatriot Annika Beck 6-4 6-0.