With the match clock at just over two hours, Kerber grabbed an early break to lead in the final set at 6-4 4-6 2-1, before Keys pulled out of the contest.
"It was a really good match in the first two sets, and this is never the way that you want to win the match," three-time Grand Slam winner Kerber said.
"I hope Madison will recover really soon so she is ready for the next tournaments."
Opinion: No multiple major winners again, but Barty’s 2021 season should be given more respect
After a run to the Eastbourne final in early July, Kerber won just one match at Wimbledon - where she was the holder - and arrived in Osaka on the back of a five-match losing streak.
The German expressed her delight at reaching her fifth Pan Pacific Open semi-final in six appearances since 2012.
"I think I like to play in Japan. Always when I'm coming back, I feel good here and I'm playing good tennis," former world number one Kerber said.
"This year, I'm here to play as good as I can and I'm looking forward to playing another semi-final here."
Persistent rain washed out the rest of the quarter-final matches, with home favourite Naomi Osaka's meeting with unseeded Yulia Putintseva moved to Saturday in the revised schedule.
The semi-final matches have been scheduled for the evening session, the organisers confirmed.
US Open
'She has a great future' - Kerber pays tribute to rising star Fernandez after defeat
06/09/2021 AT 06:32
US Open
US Open Order of Play Day 4 - Raducanu, Djokovic, Barty in action
02/09/2021 AT 09:12