According to US media reports, El Shafee Elsheikh and Alexanda Kotey, who are from London, are in the custody of the American military, the BBC reported.
The two were part of the IS cell - dubbed "The Beatles" because of their British accents. The group also included Mohammed Emwazi, known as Jihadi John, who was killed in a US air strike in 2015, and Aine Davis, who has been jailed in Turkey.
In a tweet on late Wednesday night, Trump said: "In case the Kurds or Turkey lose control, the US has already taken the two IS militants tied to beheadings in Syria, known as the Beetles (actual spelling Beatles), out of that country and into a secure location controlled by the US. They are the worst of the worst."
Trump's announcement comes after the US withdrew its forces from the region this week.
Earlier Wednesday, President Trump told the media that the US had transferred "some of the most dangerous IS fighters" amid fears they could escape custody as Turkish troops invade Kurdish-held territory in northern Syria.
The Kurds, who helped defeat the terror group in Syria and were key US allies in that fight, guard thousands of IS fighters and their relatives in prisons and camps in areas under their control.
It was unclear whether they would continue to do so if fighting breaks out.
( With inputs from IANS )