Canas, who beat Federer in consecutive tournaments in March, was broken at love in the second game. Two more breaks of serve gave Federer the first set in 21 minutes.
"I played aggressively, took my chances and felt in control," Federer said. "It was nice to beat him, that's for sure."
Canas held serve for 1-1 in the second set. But Federer, the defending champion, abandoned the groundstrokes and came to the net. He scored 14 of his 17 overall winners at the net in the second set.
Federer, who won 32 of his 41 service points, broke Canas again in the sixth game before holding serve for the rest of the way. He beat Canas for the first time since 2005, improving to 2-3 against him in his career.
Nadal looked to take control of the first set with a break in the 11th game, but Murray broke back to send it to a tiebreak where the Spaniard converted his second set point, spinning a forehand down the line.
"It was a great game from start to finish and winning that first set was important ... with this surface favoring Andy's game," Nadal said.
Murray immediately broke to open second set, using a backhand to take the lead after Nadal recovered from 15-40 back to deuce.
Nadal needed four tries but broke back to even the set at 4-4. Looking to repeat his 2005 title, Nadal held with a light touch at the net before clinching it with a final break in the 10th to earn a quarterfinal match against David Nalbandian, who beat Juan Martin Del Potro 6-2, 6-4.
"It was an unbelievably close match," Murray said. "I probably should have won the second set ... I had a lot of chances and didn't take them. He's a little bit more experienced than me and he took the points better."
Canas defeated the top-ranked player earlier in the year at Indian Wells and Miami, but the indoor surface favored Federer.
"I was especially disappointed with the Miami loss, so to beat him later in the year after two tough losses is nice," Federer said. "I think the surface was much slower in Indian Wells and Miami. And I didn't know his game so well then."
"I haven't played so far on the level that I can, but the most important thing is that I won," Djokovic said.
Ferrero's last title was the 2003 Madrid Masters, a stretch of 88 tournaments.
Djokovic had the decisive break in the eighth game before clinching the first set with one of his five aces.
Djokovic failed to convert any of five break points in the first game of the second set and Ferrero broke in the next game. Ferrero, who saved five break points overall in the set, got to Djokovic's drop shot and tapped it past him for a second break in the eighth game to even the match.
He broke Ferrero to lead 2-0 in the third set and maintained that advantage to close it out.
"It's been a long year and I've played a lot of matches. And, maybe in some stages, physically and mentally I don't look so effective," Djokovic said.