“This is not politics as usual but rather political warfare at an unprecedented level that is openly engaged in the direct targeting of a seated president through manipulation of the news cycle,” Mr. Higgins wrote in the memo, a copy of which was obtained by Foreign Policy and published on Thursday. “Recognizing in candidate Trump an existential threat to cultural Marxist memes that dominate the prevailing cultural narrative, those that benefit recognize the threat he poses and seek his destruction.”

Among those threatened by Mr. Trump is the “hard left,” Mr. Higgins wrote. He said it was “aligned with lslamist organizations,” including the Muslim Brotherhood and the Council on American-Islamic Relations; the American Civil Liberties Union and Black Lives Matter; and the United Nations.

“Complicating the current situation, many close to the president have pushed him off his message when he was candidate Trump thus alienating him from his base thereby isolating him in the process,” Mr. Higgins wrote. He was echoing the concerns of some of Mr. Trump’s earliest supporters, who have recently stepped up a public campaign to press for General McMaster’s ouster. “When President Trump is not candidate Trump, he becomes dangerously exposed.”

Mr. Higgins did not respond to messages requesting comment on Friday. A White House spokesman also declined to comment.

But two administration officials with knowledge of the situation said that after Mr. Higgins had circulated the document, which was widely viewed as inappropriate, he was ordered to resign. His resignation was demanded by Maj. Gen. Ricky Waddell, the deputy national security adviser, after consulting with General McMaster, according to the two officials who spoke on the condition of anonymity because they were not authorized to discuss it.