ISIS was essentially Al-Qaeda in Iraq just rebranded and expanded into Syria. That predates the pulling out of our troops.
"US troops and allied Sunni militias defeated al-Qaeda in Iraq during the 2007 "surge" — but didn't destroy it. The US commander in Iraq, General Ray Odierno, described the group in 2010 as down but "fundamentally the same." In 2011, the group began rebuilding, and in 2012 and 2013 it freed a number of prisoners held by the Iraqi government, who then joined its ranks.
In 2013, the group once known as al-Qaeda in Iraq — now based in both Syria and Iraq — rebranded as ISIS."
ISIS used to be al-Qaeda in Iraq - 18 things about ISIS you need to know - Vox
Also:
Former Military Chief: Iraq War Was A 'Failure' That Helped Create ISIS
"Retired Lt. General Michael Flynn, the former head of the Defense Intelligence Agency who came up through intelligence positions in Iraq and Afghanistan, says that the George W. Bush administration’s Iraq war was a tremendous blunder that helped to create the self-proclaimed Islamic State, or ISIS.
“It was a huge error,” Flynn said about the Iraq war in a detailed interview with German newspaper Der Spiegel published Sunday.
“As brutal as Saddam Hussein was, it was a mistake to just eliminate him,” Flynn went on to say. “The same is true for Moammar Gadhafi and for Libya, which is now a failed state. The historic lesson is that it was a strategic failure to go into Iraq. History will not be and should not be kind with that decision.”
When told by Der Spiegel reporters Matthias Gebauer and Holger Stark that the Islamic State would not “be where it is now without the fall of Baghdad,” Flynn, without reservations, said: “Yes, absolutely.”"