E. Jean Carroll, the longtime Elle magazine advice columnist who last year accused Donald J. Trump of raping her before he was elected president, said on Tuesday that she was fired by the publication because of Mr. Trump’s repeated insults against her.

Ms. Carroll, the author of the “Ask E. Jean” column, announced her departure from the magazine on Twitter and blamed it on Mr. Trump, who she said had sexually assaulted her in a dressing room at an upscale New York department store more than 20 years ago.

Mr. Trump has repeatedly denied Ms. Carroll’s accusation.

“Because Trump ridiculed my reputation, laughed at my looks, & dragged me through the mud, after 26 years, ELLE fired me,” Ms. Carroll wrote on Twitter. “I don’t blame Elle. It was the great honor of my life writing ‘Ask E. Jean.’”

Ms. Carroll sued Mr. Trump for defamation in New York State Court in November, saying that Mr. Trump had damaged her reputation and her career when he denied her allegation last June and called her a liar.