"I am disappointed that I have to withdraw from Tokyo and Shanghai as they are two of my favourite cities in the world and the fans have been great to me over the years," Federer said.
"After consultation with my team and doctors, I have decided to withdraw from both tournaments so that I can give my body a chance to rest, rehabilitate and fully recover from a physically challenging year," he added.
Federer reclaimed his world number one spot from Rafael Nadal this year, winning the French Open for the first time and Wimbledon, but failed to win a sixth consecutive U.S. Open title when he lost to Argentina's Juan Martin del Potro in the final at Flushing Meadows earlier this month.
Serena pulls out of Pan Pacific Open
World number two Serena Williams has pulled out of next week's Pan Pacific Open with knee and toe injuries, organisers said.
The Australian Open and Wimbledon champion has not played a singles match since her rant at a lineswoman in her semi-final loss to Belgian Kim Clijsters at the US Open earlier this month.
The rest of the women's world top 10, including Serena's older sister Venus, is among the field at the $2 million event.
Safina look to defend No.1 spot
Dinara Safina, yet to validate her status as world number one with a Grand Slam title, says she will not give up the top ranking without a fight.
The 23-year-old Russian promised to prove her point by successfully defending her Pan Pacific Open crown in Tokyo next week following an early exit from the US Open.
"If someone steals it from me, I will shake their hand and say 'well done' but I won't give it up easily," she said.
A shock defeat by Czech teenager Petra Kvitova in the third round in New York earlier this month raised the stakes still further, but Safina was in bullish mood in Tokyo.
"I played the best tennis of my life here last year," she said ahead of the $2-million event.
"I plan to bring my best tennis again and give 100 per cent to keep the ranking," she added.
Obama to co-chair Friends of Pakistan forum meet
Del Potro knocks out top seed Ferrer
Clijsters, Wozniacki to clash in US Open final
Toe injury puts Del Potro out
Serena Williams pulls out injured of Paris Open