No reason was given for Federer's withdrawal, which was announced by tournament director Eugene Lapierre on Friday.
The fifth-ranked Federer won the tournament in 2004 and 2006 in Toronto. He also lost in the final to Novak Djokovic in Montreal in 2007.
"I am disappointed not to be playing in Montreal next week," Federer said in a statement. "It is a great tournament with amazing fans. I look forward to competing there in the future."
Jo-Wilfried Tsonga of France, Serbian Viktor Troicki and Croat Marin Cilic will also not be competing in the men's competition.
Ivan Dodig of Croatia and Spaniard Pablo Andujar will check in as replacements.
The main draw in the men's edition of the Rogers Cup starts Monday in Montreal. The women's Rogers Cup goes next week in Toronto.Suggest a correction