In windy conditions, the British No 1 broke the former Wimbledon finalist once in each set to record a 6-4, 6-4 victory and reach round four.
A match predictably short of opportunities for either man burst into life in the sixth game of the second set as Edmund seized his chance to break the Raonic serve.
Showing no signs of relinquishing his own serve in the second set, Edmund pounced in the ninth game when a series of belting returns helped him break to love.
Edmund, who endured a difficult start to his year after fitness issues saw him drop out of the world top 10, duly served out for a confidence-boosting victory.
The 24-year-old next faces defending champion John Isner who beat Albert Ramos-Vinolas 7-5, 7-6 (6).
“Isner is a similar match up in that you have to try to get his serve back,” Edmund said.
“It’s more just how heavy his serve is and how tough it is to read. I have nothing to lose and have to give my best. I’m feeling good.
“Today it was tricky conditions, blustery and you couldn’t predict anything. To be able to break him once in each set was huge.”
Isner was broken in the first game of his match with Spaniard Ramos-Vinolas but held thereafter and hit 16 aces.
The American, now 33, won the biggest title of his career in the tournament a year ago. He is seeded seventh this year.
In the women’s singles, Venus Williams reached the fourth round of the tournament for the 16th time with a 6-3, 6-1 victory over Daria Kasatkina, who never held serve.
Williams, who won the title in 1998, 1999 and 2001, next faces world No 3 Simona Halep, who outlasted Polona Hercog 5-7, 7-6 (1), 6-2.
“I was running like crazy for three hours,” Halep said. “If I keep doing this, I think I have a chance to be back No 1.”
A defeat on Saturday by world No 1 Naomi Osaka opened the door for Halep to reclaim the top ranking if she reaches the final.