The 20-time Grand Slam champion and top seed will meet 13th seed Borna Coric on Saturday after the Croatian defeated unseeded Australian Matthew Ebden 7-5, 6-4.
The other semi-final tees up Novak Djokovic against young German star Alexander Zverev, just the second time they will have met.
The 37-year-old Federer was forced to battle through the first two matches of his title defence, first to Daniil Medvedev and then Roberto Bautista Agut.
He put Nishikori under the cosh immediately, breaking the eighth seed in the first game of both sets, though the Japanese did well to recover and force the second-set tie break.
Djokovic said that he was relishing facing “top player” Zverev after the 14-time Grand Slam champion beat Kevin Anderson 7-6 (7/1), 6-3.
Djokovic saved set point in the opener before taking control of the tie break and the second set to dump out the South African seventh seed.
The 31-year-old from Serbia is in blistering form, winning Wimbledon, the Cincinnati Masters and US Open in recent months, after having elbow surgery in February.
The second seed is desperate to grab injured Rafael Nadal’s year-end number one ranking.
Djokovic and Zverev met on clay in the final of the Rome Masters in May last year, the 21-year-old German winning 6-4, 6-3.
Djokovic, who endured a turbulent last season with injury and off-court issues, said they were “both different players” now.
“I wasn’t — I feel like — playing as well as I’m playing today,” he warned.
“But also he has improved a lot and he has established himself as a top player.
“It’s going to be definitely a close match.”
Touted as a potential future multiple Grand Slam winner, fourth seed Zverev eased past Kyle Edmund to reach his first Shanghai semi-final.
The 6-4, 6-4 victory over the 11th-seeded Briton seals Zverev’s place in the season-ending ATP Finals in London next month, which bring together the top eight men.
The top four players in the world — Nadal, Federer, Djokovic and Juan Martin del Potro — had already qualified for London. Zverev is ranked fifth.
Zverev, now under the tutelage of Ivan Lendl, said he is pleased with his overall progress, even if a maiden Grand Slam remains elusive.
“I think every year you feel more mature. Every year you spend on tour, you feel kind of different,” he said.
“Last year was the first time I kind of broke through to the top 10 and was a top-five player.
“It’s always easier to get there — but then staying there is always the tougher part.”
Click to signup for FREE news updates, latest information and hottest gists everyday
Advertise on NigerianEye.com to reach thousands of our daily readers