He has decided to speed up his plan to leave in mid-February.
He said in his resignation letter that the militants were on the run, but not yet defeated, and that the premature pullout of American forces from Syria would create the conditions that gave rise to IS.
McGurk also cited gains in accelerating the campaign against IS, but that the work was not yet done.
His resignation letter, submitted on Friday to Secretary of State Mike Pompeo, was described to The Associated Press on Saturday by an official familiar with its contents, who spoke on condition of anonymity.
McGurk's resignation is effective from December 31.
He had been planning to leave the job in mid-February after a US-hosted meeting of foreign ministers from the coalition countries, but he felt he could continue no longer after President Donald Trump's decision to withdraw from Syria and Mattis' resignation, according to the official.
McGurk was appointed to the post by then president Barack Obama in 2015 and retained by Trump.
Trump is acting to pull all 2000 US troops from Syria and has now declared victory over IS, contradicting his own experts' assessments.
Many lawmakers have called his action rash and dangerous.
Mattis, perhaps the most respected foreign policy official in the administration, announced on Thursday that he will leave by the end of February.
He told Trump in a letter that he was departing because "you have a right to have a Secretary of Defense whose views are better aligned with yours".
McGurk, 45, previously served as a deputy assistant secretary of state for Iraq and Iran.
He is a former lawyer, and in 2007 and 2008 was the lead US negotiator on security agreements with Iraq under the George W Bush administration.
Taking over for now for McGurk will be his deputy, retired Lieutenant General Terry Wolff, who served three tours of active duty in Iraq.
Jim Jeffrey, a veteran diplomat who was appointed special representative for Syria engagement in August, is expected to stay in his position, officials said.
IS militants still hold a string of villages and towns along the Euphrates River in eastern Syria, where they have resisted weeks of attacks by the US-supported Syrian Democratic Forces to drive them out.
The pocket is home to about 15,000 people, among them 2000 IS fighters, according to US military estimates.
But that figure could be as high as 8000 militants, if fighters hiding out in the deserts south of the Euphrates River are also counted, according to the Syrian Observatory for Human Rights.