The 11th seed from Thornhill, Ont., needed just 67 minutes to advance comfortably on Centre Court at the Real Club de Tenis against the clay specialist who has played in two Barcelona semifinals.
Raonic, ranked 25 in the world, was never threatened. He served seven aces, saved both break points he faced and broke world No. 13 Almagro three times.
"This was probably my best win on clay," said Raonic. "There's been a big change for me this week. I'm very proud of my play today, and I'm progressing well. . . . Before the first round, I was feeling quite miserable about my game. I had trained well but didn't do so well last week. I was having trouble getting some things together. But I've been able to pick it up in my last two matches
"I'm hitting and moving well and that makes the difference in my game. I'm taking a lot of confidence into the quarter-finals."
Raonic will face Andy Murray on Friday. The second seed from Scotland cruised into the quarter-finals with a 6-1, 6-2 victory over Santiago Giraldo.
The fourth-ranked Murray was hardly troubled by his Colombian opponent, serving nine aces in a quick victory.
Raonic's victory marks his second career clay quarter-final at the ATP level. He also reached the final eight in Estoril, Portugal, last spring when he defeated Frenchman Gilles Simon.
Raonic broke Almagro for a 4-3 lead in the opening set of a sparsely attended morning match.
After winning the set in 33 minutes, the Canadian then took a 4-2 lead in the second. Raonic won three games later after Almagro saved a first match point but couldn't touch a return winner on the second.
Raonic, winner of two ATP titles this season, also defeated Almagro in January en route to the Chennai championship.
Raonic's third win of the season on clay lifted his 2012 record to 20-4.
Later Thursday, Rafael Nadal broke Robert Farah of Colombia in the first game on his way to a 6-2, 6-3 victory for his 31st straight win at the tournament. The six-time champion set up a last-eight match with fifth-seeded Janko Tipsarevic after the Serbian beat Frederico Gil 6-2, 6-2.
"It may sound stupid but against players like him you have to go for victory, if you look for a fight you've already lost," Tipsarevic said. "Rafa is playing like he always does on clay, the best, but I'll go out there looking to win and see what happens."
Nadal beat Tipsarevic 6-1, 6-0, 6-2 in their last meeting, in the Davis Cup three years ago.
Also, third-seeded David Ferrer broke Albert Montanes five times to brush aside the fellow Spaniard 6-0, 6-2, while 2010 winner Fernando Verdasco defeated Kevin Anderson of South Africa 6-4, 6-4.
Japan's Kei Nishikori beat Spain's Albert Ramos 7-6 (2), 6-3 and Feliciano Lopez also reached the last eight with a 6-3, 6-1 victory over Jarkko Nieminen.
— With files from the Associated Press.Suggest a correction