The 25-year-old broke the Canadian's usually-dominant serve four times on his way to recording a 6-4 6-4 6-2 victory at Arthur Ashe Stadium.
"I used a lot of variation tonight," said Murray. "He has a huge game, with big serves. I got lucky couple of times but hit my passing shots very well. I had only played him one time before and you start to see things after a few games.
"I was just trying to react as quickly as possible. Sometimes the serves fly past you, sometimes you get a racquet on them and tonight I got a racquet on them. I tried to stay focused for every points and did a good job of that."
Murray will now face Croatia's Marin Cilic in the quarter-finals at Flushing Meadows.