In the letter, Gorka accused Trump of caving into "forces that do not support the [make America great again] promise" that Trump made to his supporters during the 2016 campaign.
But a White House official implied Friday he was sacked.
Gorka, who frequently appeared on cable news shows to tout Trump's policies, was seen to be a divisive figure within the administration by veteran intelligence professionals and diplomats as an ideologue with little real-world experience.
Progressive groups have welcomed the departure from the White House of national security aide Sebastian Gorka.
Another complaint our favorite chef had about the speech was that Trump never once said "radical Islamic terrorism", again implying that a significant portion of this administration was under the impression that if you say those words enough times, ISIS will simply evaporate.
The White House announced Gorka's departure on Friday evening, just one week after his ally, Stephen Bannon, left his post as White House chief strategist.More news: Trump Targets New Venezuelan Debt in Latest Round of Sanctions
More news: Nasarawa State pilgrims arrive in Saudi Arabia - Amirul Hajj
More news: US State Department Refuses to Endorse Two-State Solution
During his stint in the White House, Gorka focused mostly on national security policy including rising fundamentalism in the Middle East and and combating China's economic warfare.
He wrote to Trump: "Regrettably, outside of yourself, the individuals who most embodied and represented the policies that will "Make America Great Again" have been internally countered, systematically removed, or undermined in recent months".
"Let's get everything on the record, I chose to resign last week", he said, explaining that he made the decision after Trump's speech on Afghanistan this week.
"General Kelly, the new chief of staff to Donald Trump, has been going through a review of what everyone in the White House is supposedly doing", Weinstein explained.
From past reports, it appeared that the issue was his inability to get a security clearance, making it impossible for him to do substantive work on his claimed areas of expertise such as national security.
Breitbart confirmed it is talking with Gorka about a new role.