Federer was beaten by Alexander Zverev in the final of the Rogers Cup on Sunday, his limited mobility leading to concerns over his fitness ahead of the US Open.
The Swiss, who has already triumphed at the Australian Open and Wimbledon this year, reported only "aches and pains" after the tournament.
But the 19-time grand slam champion's condition is bad enough for him to pull out of a competition he was won seven times.
With Federer claiming no ranking points from the tournament in Cincinnati and Andy Murray, who will also miss out as he recovers from the hip problem that derailed his Wimbledon bid, losing the points he earned by reaching the final in 2016, Nadal will ascend to world number one.
The Spaniard, who won the French Open for a 10th time this year having been beaten by Federer in the final in Melbourne, was last at the top of the rankings the week of June 23, 2014.
— W&S Open (@CincyTennis) August 14, 2017
Photo Getty Images. Caption: 19-time grand slam champion Roger Federer