The world number five admitted after losing his first match in Gstaad last week that he was struggling with a back problem.
On Friday, Federer announced he would not be playing in Canada, saying on his Facebook page: "I am disappointed not to be playing in Montreal next week. It is a great tournament with amazing fans. I look forward to competing there in the future."
Back problems are nothing new for Federer, and it appears his decision to play two clay-court tournaments after Wimbledon has backfired.
The Swiss star is enduring his worst season since before he won his maiden grand slam title at Wimbledon a decade ago.
After a second-round defeat by Sergiy Stakhovsky at the All England Club in June, Federer announced he was taking the unusual step of playing in Hamburg and Gstaad.
He trialled a new, bigger racket during the tournaments but if he was looking to restore lost confidence, it did not work, with Federer losing to Federico Delbonis in Germany and then Daniel Brands on home soil in Switzerland.
If the 31-year-old - he turns 32 next week - does not improve his form soon, he is in danger of sliding further down the rankings, with Tomas Berdych and Juan Martin del Potro not too far adrift.
Missing Montreal will not cost Federer in itself because he also missed the tournament last year following his run to the Olympic final.
But he won the Masters event in Cincinnati the following week and is now under pressure to do well again there.
There were fears when Rafael Nadal lost in the first round of Wimbledon that his knee problems would rule him out of the start of the hard-court season but he is already practising in Canada.
World number one Novak Djokovic is the defending champion, while Andy Murray will play his first match as Wimbledon champion.
Jo-Wilfried Tsonga withdrew on Wednesday having failed to recover from the knee injury he aggravated at Wimbledon, while Gael Monfils, Mardy Fish, Viktor Troicki and Marin Cilic have also pulled out.