Trump announced on Wednesday that ISIS had been "defeated" and it was time to bring troops home. The announcement came in direct opposition to his own military leaders. including McGurk, and ignored calls from many Republicans to keep troops engaged.
"We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency," he tweeted.
McGurk, 45, follows Defense Secretary James Mattis out the door. Mattis resigned earlier this week over the same decision to pull troops from Syria. He will serve until February.
Mattis specifically referred to the importance of relying on McGurk's "Defeat-ISIS coalition of 74 nations" in his resignation letter.
McGurk's resignation is effective Dec. 31.
McGurk, who served repeatedly as a government official in Iraq since 2004, informed Secretary of State Mike Pompeo of his decision to leave Friday night.
Trump tried to downplay McGurk's exit, saying he planned to leave next year anyway -- and pointed to him as being an appointee of then-President Barack Obama in 2015.
"The Fake News is making such a big deal about this nothing event!" he tweeted.
McGurk was going to retire in early 2019, but he made the decision to leave now instead because he felt he couldn’t carry out the president’s order and “maintain my integrity,” as he wrote to colleagues in a letter confirmed to ABC News by a government official. The New York Times was first to report the details of McGurk's resignation letter.
There are about 2,000 U.S. troops in eastern Syria advising and assisting the Kurdish-led Syrian Democratic Forces (SDF) in the fight against ISIS. The withdrawal of troops could be completed within 30 days of Mattis giving the official order.
McGurk made statements earlier this month completely contradicting Trump's claim of the fight with ISIS being finished, saying, in an echo of then-President George W. Bush's famous blunder, that "nobody is declaring a mission accomplished." About 2,000 ISIS fighters remain in Syria, according to State Department and Pentagon officials.
"Even as the end of the physical caliphate is clearly now coming into sight, the end of ISIS will be a much more long-term initiative," McGurk said at a State Department briefing last week. "We’ve talked about that many times. Nobody working on these issues day to day is complacent. Nobody is declaring a mission accomplished."
Despite Trump's attack on the media, even many of his allies in Congress immediately condemned the decision to remove troops from Syria.
"If this decision stands, I can't imagine being able to sign up many people in the future to serve with us to defeat enemies that threaten us after today," Sen. Lindsey Graham, R-S.C., said on the Senate floor Wednesday.
"We have been dishonorable," he added. "This is a stain on the honor of the United States. I hope and pray the president will reconsider this."
Republican Sen. Marco Rubio of Florida told Politico the decision was "a major mistake" and said "it will haunt this administration."
ABC News' Conor Finnegan, Justin Fishel and Lana Zak contributed to this report.