The Good Wife
The Good WifeFacebook.com/TheGoodWife

Fans of "The Good Wife" were left reeling after Sunday's episode, as one of the show's most popular characters, Will Gardner, played by Josh Charles, was killed off.

Gardner was gunned down by his client in the middle of the courtroom, and he was later pronounced dead at the hospital.

Soon after the episode was aired, Twitter was abuzz with fans expressing their shock at losing Gardner, a dashing attorney. While many noted that it will be difficult to get over Gardner's death, another section called for a boycott of the CBS' legal drama.

"Will Gardner is dead. And my life is ruined," yet another viewer noted.

"The Good Wife" creators – Robert and Michelle King -- soon posted online a letter titled "Dear Loyal Good Wife Fans" explaining that the reason for killing off Gardner was because Charles was leaving the show.

They said that although they toyed with the possibility of sending off Gardner to Seattle, get married or disbarred, they decided against it, as the characters of Will and Alicia shared a passion that wouldn't die down because they are at different places.

"The brutal honesty and reality of death speaks to the truth and tragedy of bad timing for these two characters. Will's death propels Alicia into her newest incarnation," they wrote.

Meanwhile, Charles too said that killing off the character was a wise move and called it powerful, strong and shocking.

In an interview with TVLine, Charles stated the need to explore other options as the reason for quitting the show.

"Creatively, I'm excited about where this year has gone, and the depths that they've taken Will to has been really interesting for me. It has been an overwhelmingly positive experience. [But] you just kind of know sometimes when you're ready to move on to new experiences. And that [doesn't mean] there's something wrong with this experience. It's more about what I want to explore. It does me no good to second-guess that," he explained.

The actor won a People's Choice Award for favorite dramatic television actor for his "The Good Wife" role in addition to clinching a Golden Globe nomination.