"I personally had discussions with top Taliban leaders whereby they understood what they are doing now would not have been acceptable," Trump said in a statement.
Trump said if he were a president now, the United States would conduct a condition-based withdrawal of its forces from Afghanistan.
"It would have been a much different and much more successful withdrawal, and the Taliban understood that better than anyone," Trump said. "What is going on now is not acceptable."
The Taliban have been reclaiming large portions of Afghanistan as the US and NATO forces near the completion of their withdrawal from the country.
The US embassy in Kabul has urged all Americans in Afghanistan to leave the country immediately.