Federer, who has participated in the Ohio warm-up tournament for the U.S. Open on seven occasions, said he had picked up the injury in Montreal, where he lost to Germany's Alexander Zverev in the final.
"I am very sorry to pull out of the Western and Southern Open as I always enjoy playing here," Federer said in a statement issued by the tournament.
"Cincinnati has some of the best fans in the world and I am sorry I will miss them. Unfortunately, I tweaked my back in Montreal and I need to rest this week."Federer's withdrawal assures that Nadal will be top of the rankings when they are issued on Aug. 21. The Spaniard will be back in the top spot for the first time since July 6, 2014.
Nadal will take the number one position from Briton Andy Murray, who previously announced he would not play in Cincinnati due to a hip injury.
Nadal, who has won one grand slam and two Masters 1000 titles in 2017, was upset by 18-year-old Canadian Denis Shapovalov at the Rogers Cup last week.