"If America doesn't withdraw its troops from Afghanistan, soon Afghanistan will become another graveyard for this superpower in the 21st century," he said.
In his first formal address to the US as commander-in-chief, Trump backtracked from his election pledge to end the US' longest war that has dragged on for nearly 16 years.
Since taking office in January, Trump said he has realised that withdrawing could create a vacuum for groups such as al-Qaeda and the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) to exploit.
Though his speech was billed as an announcement of his updated Afghanistan policy, Trump offered few specific details.
He did not, for example, provide a number of the additional troops that would be sent to the war.
The US currently has around 8,400 troops in the country, down from a peak of about 100,000 troops in 2010 and 2011, with around 5,000 from NATO allies assisting a much larger Afghan force in the war against the Taliban and other armed groups.
A senior Taliban commander told the AFP news agency that Trump was perpetuating the "arrogant behaviour" of previous US presidents, such as George Bush.
"He is just wasting American soldiers. We know how to defend our country. It will not change anything.
"For generations, we have fought this war, we are not scared, we are fresh, and we will continue this war until our last breath."
Al Jazeera's Jennifer Glasse, reporting from the Afghan capital Kabul, said the Taliban was taking a very hard line to the president's speech.
"The Taliban has made it clear they're committed to continue fighting the enemy and are in turn giving the US latitude to do so.
"Both President Bush and Obama said they would take the fight to the Taliban ... but it remains to be seen whether Trump's plan can yield any different results.
"The Afghan government has been very bullish on the new strategy, but since we don't know the specifics, we don't know what Trump plans to do differently."
The war in Afghanistan, which began on October 7, 2001, after the September 11 attacks, has claimed the lives of more than 2,200 US troops and cost more than $800bn.
There is no official figure of the number of Afghan civilians killed, but estimates range between 25,000-30,000. According to the UN Assistance Mission in Afghanistan (UNAMA), at least 1,662 civilians were killed between January 1 and June 30 this year.
While Trump has refused to offer detailed figures, senior White House officials said he had already authorised his James Mattis, the defence secretary, to deploy up to 3,900 more soldiers.
In his speech, Trump also lambasted ally Pakistan for offering safe haven to "agents of chaos".
"We have been paying Pakistan billions and billions of dollars at the same time they are housing the very terrorists that we are fighting," he said.
"It is time for Pakistan to dedicate to civilization and order and peace."
A commander from the Taliban-allied Haqqani network told the AFP news agency that Trump's speech was proof of "a Crusade".
"His statement has proved that he wants to eliminate the entire Muslim [community]," he said.
Prior to Trump's announcement, the Taliban had written an open letter warning him not to send more troops and calling for the complete withdrawal of foreign forces from Afghanistan.
Source: News agencies