Kerber led 6-4, 4-6, 2-1 when the fifth-seeded Keys retired.
"It was a really good match in the first two sets, and this is never the way that you want to win," Kerber said. "I hope Madison will recover really soon so she is ready for the next tournaments."
Keys recorded 39 winners against 33 unforced errors, while Kerber had 18 winners and 13 unforced errors.
Linette next faces second-seeded Ekaterina Alexandrova for the first time. The Russian beat Kristie Ahn of the United States 6-7 (0), 6-4, 6-4. Ahn held a 2-0 lead in the decider before losing four straight games, and she was unable to make a comeback.
At the Guangzhou International in China, Samantha Stosur rallied after a slow start to beat Viktorija Golubic 2-6, 7-6 (4), 6-1 in the semifinals and qualified for her first WTA singles final in two and a half years.
"I just tried to hang in there and find a way to start playing a bit better," Stosur said. "She's very tough to play against, so I'm just happy to get through."