Williams, 52, will play Courtney Boalt, an extremely successful businesswoman, who is potentially interested in backing Peter Florrick's (Chris Noth) campaign for president.
In the process, she meets Eli Gold (Alan Cumming), sparking a mutual attraction, reported Entertainment Weekly.
"There are very few names you can put side-by-side that make you laugh. Alan Cumming and Vanessa Williams are at the top of that list. We couldn't be more excited," executive producers Robert and Michelle King said.
William's character will make her debut in November.
On season two, America Ferrera joined the cast as Natalie Flores, a college student who worked as a nanny for Wendy Scott-Car, whom Eli Gold fell in love with.
"The Good Wife" returns on October 4.