The role will mark Pierce's first appearance in a television series since Frasier ended its run in 2004. Pierce portrayed Dr. Niles Crane, the title character's brother, on the sitcom for 11 seasons.
In The Good Wife, he will play a highly respected cable news legal commentator so disgusted by the corruption and murder rate in Chicago he decides to run for office in order to effect change, the network said in a news release.
"We couldn't be more thrilled and flattered that David's making The Good Wife his first TV role since Frasier," Executive Producers Robert and Michelle King said in a joint statement. "We're tremendous fans of his dramatic skills as well as his comedy."