She will face No. 20 Naomi Osaka in Thursday's semifinals.
It was a routine start to the match in front of a relatively subdued crowd, still filling the stadium ahead of the men's quarterfinal between Novak Djokovic and John Millman.
Keys faced only two break points, one while serving for the victory in the final game, and saved both.
Madison Keys of the United States of America celebrates match point against Carla Suarez Navarro of Spain in a quarterfinal match on day ten of the 2018 U.S. Open tennis tournament at USTA Billie Jean King National Tennis Center.
Stream every match at the US Open live on the FOX+ app and catch up on highlights of any action you've missed. Having achieved as much as Williams might make anyone complacent and a fan may not even have blamed her for hanging up her racquet - after all, she has more than proved her status as the Greatest of All Time.
The second set looked to be going the same way when the Croat broke again in game six for a 4-2 lead, but Nishikori dug in and hit straight back, winning the next three games to level the match.
"I feel like that's one thing I really worked on was my moving because it was a little suspect right after my return, " Williams said.
In the match before Nishikori's, Naomi Osaka moved into her first Grand Slam semifinal by routing Lesia Tsurenko 6-1, 6-1 on Wednesday in the U.S. Open quarter-finals.
Once she did, the 20-year-old Osaka found they had plenty in common. I was up 4-1 and he came back.
Before Nishikori, only Shuzo Matsuoka had made the last eight in men's singles in a major at Wimbledon in 1995. That year, she beat already five-time Grand Slam victor Martina Hingis - the unstoppable World No 1, for her title - and summarily also took doubles honours with her sister Venus, the pair's second Grand Slam title.
Osaka swept aside 36th-ranked Tsurenko in just 57 minutes as the Ukrainian's challenge fizzled out in a deluge of mistakes.
But Osaka has some serious weapons of her own. "My entire body was shaking so I was really glad I was able to play well today".
But after reaching the final in Monte Carlo, the French Open fourth round and the Wimbledon quarter-finals, Nishikori believes an elusive first grand slam is within reach.
Keys: 'I felt good today.
"I really don't think it's that hot, sorry".