The top seed and world number three will face Tunisia's Malek Jaziri, ranked 64, for a place in the last eight, as he steps up his bid for another tilt at the Wimbledon title.
"It was hard to find a rhythm today. He took the ball early, went for a lot on the forehand, backhand. He has a big serve, especially the first one," Federer said.
"So then you go back to basics, you focus on your own serve. I thought I did that very well. He never really had chances on my own serve, so that was comforting."
But Wednesday's tie was just his 19th match of the season after he struggled with a back injury and endured knee surgery in February.
His injury woes forced him to skip the French Open, ending his record run of 65 successive Grand Slam appearances stretching back to 1999.
Last week, 17-time major winner Federer made the semi-finals of the Stuttgart grasscourt event, where he lost to Dominic Thiem, who went on to take the title.
"I feel after the first round, after having played last week, actually maybe something is really possible here," added Federer.
"I don't want to get too carried away but I feel like if I serve the way I did today and I'm able to step it up just a little bit on the return from the baseline, all of a sudden I'm dangerous for anybody.
"We'll see how it goes. But I take one match at a time and I hope just to keep on playing a bit better match by match."
Nishikori, seeded two in Germany behind Federer and a semi-finalist in 2014 and 2015, was to play Florian Mayer, who was given a walkover into the quarter-finals.
"I'm very sad to not be able to go on playing," said Nishikori, whose status for Wimbledon is not yet certain.
German teenager Alexander Zverev made the quarter-finals when compatriot Benjamin Becker, 16 years his senior, withdrew with an injury at 7-5, 3-0 down.
Zverev will next meet Cypriot veteran Marco Baghdatis who put out Dustin Brown, also of Germany, 7-5, 7-6 (10/8).
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
