Eighth seed Raonic became only the second Canadian to reach the last eight at Melbourne Park, nearly 50 years after Michael Belkin achieved the feat in 1968.
In a battle of big servers, Lopez coolly saved two match points in the fourth set tiebreak before sending the contest into a decider but double-faulted in the eighth game of the final set to hand Raonic the initiative.
Raonic closed it out on the third match point when Lopez pushed a shot wide. The Candian advances to play the winner between top seed Novak Djokovic and Gilles Muller for a place in the semi-finals.