For the second time in less than a year, the anchor Greta Van Susteren has been abruptly let go by a cable news network.

Ms. Van Susteren confirmed her departure from MSNBC, five and a half months into the job, with a post on Twitter that read “I am out at MSNBC.” Her husband and agent, John P. Coale, said she was informed of the news on Thursday afternoon.

Ms. Van Susteren, who took over the 6 p.m. hour for MSNBC in January, had been let go from Fox News last year after a messenger arrived at her home and handed her a pair of letters informing her that she was out immediately. Mr. Coale said the MSNBC president, Phil Griffin, informed Ms. Van Susteren in person in Washington around lunchtime on Thursday.

“They didn’t want her anymore,” Mr. Coale said in a telephone interview. “We’re in kind of shock.”

Though Mr. Coale said there was “no warning” that she was in trouble before her dismissal, her show had been struggling in the ratings.