The 21-year-old from Thornhill, Ont., downed the Scot 6-4, 7-6 (3) to advance to the semifinals of the clay-court tournament.
Raonic became the first Canadian to beat a top-10 player on clay at an ATP event since Martin Wostenholme of Oakville, Ont., beat 10th-ranked Alberto Mancini of Argentina in '89 at Stuttgart.
Canadian doubles veteran Daniel Nestor and Belarus partner Max Mirnyi won their quarter-final over Mexico's Santiago Gonzalez and German Christopher Kas 7-5, 6-4.
Raonic, seeded 11th, will face third seed David Ferrer on Saturday.
The six-foot-five Canadian has now beaten six top-10 players in his career, with Murray his biggest victim to date.
"Playing Murray is tough," said Raonic, ranked 25th in the world. "I had to work to neutralize his game and hold onto my serve. I had to make the most of my game and keep focus."
Raonic's fourth win of the season on clay lifted his 2012 record to 21-4.
Raonic hammered 14 aces, producing eight in the first set which he won with a single break of serve.
The second set remained tight until Raonic opened it up by breaking Murray for a 4-3 lead. But he was unable to hold on as the Scot broke back for 5-5.
As the match went into a tiebreaker, Raonic's booming serve began to pay more dividends and he took a 3-0 lead with Murray falling victim to frustration.
Up five match points, Raonic won the match on his third as Murray put a backhand into the net.
"I've done a lot of things to improve on clay," said Raonic, who admitted he started the week lacking confidence after losing in the first round at Monte Carlo.
"I was very disappointed with my result in Monte Carlo. Here I feel like I've really made a breakthrough by reaching the semifinals. It's great to beat a top 10-player, it gives me great confidence."