Muguruza was on the brink of elimination in Zhuhai on Friday, but the two-time grand slam champion fought back to win 6-7 (4-7) 6-2 7-6 (7-1).
Sevastova was twice a break up in the final set, yet the battling seventh seed rallied in a decisive match to prolong her season.
Second seed Sevastova had treatment on her back after losing the second set and did not appear to be troubled as she moved into a 2-0 lead, then broke again to go 5-4 up.
Muguruza refused to be beaten, though - the Spaniard preventing Sevastova from serving out the match and bossing the tie-break to win the Camellia Group.
Barty advanced for the second consecutive year courtesy of a straight-sets triumph for Caroline Garcia over Aryna Sabalenka, which was not enough to see Garcia through.
Garcia could only progress by losing fewer than seven games, so a 6-4 6-4 Orchid Group victory was in vain.
Wang Qiang defeated Keys 1-6 6-3 6-1 in the final round-robin match, but it is the American who qualifies from the Azalea Group to join Muguruza, Barty and Julia Goerges in the last four.
0 votes