Trump told troops at Bagram Air Base that "the Taliban wants to make a deal. We'll see if they want to make a deal. It's got to be a real deal, but we'll see. But they want to make a deal."
Afghan President Ashraf Ghani, who held a bilateral meeting with the President after his arrival, also addressed troops Thursday, per public pool reports.
"I'd like to thank you for your leadership, for your determination," Ghani said, thanking Trump for "your very principled decisions regarding putting limits on the type of peace that will ensure the gains of the past year and ensure your security and our security."
The trip marks the President's first-ever visit to Afghanistan and the second to a combat zone since taking office. Last December, he visited troops in Iraq, after which lawmakers immediately demanded U.S. troops leave the country.
Trump, who served turkey to some of the troops at the base before his address, told the service members that "there's nowhere I'd rather celebrate this Thanksgiving than right here with the toughest, strongest, best and bravest warriors on the face of the Earth."
He said the Taliban wants to get back to the negotiation table because of the "great job" they are doing.
The United States wants peace, he said, and it is working on a political solution but if forced it will win on the battlefield.
"We don't play for ties anymore," he said, adding "victory on the battlefield will always belong to you, the American warrior."
Trump called off peace negotiations that appeared near completion in September after a Taliban attack killed 12 people, including a U.S. soldier.
In October, Trump reduced the number of troops by about 2,000 from a force of approximately 13,000 members who train, advise and assist local forces in conjunction with NATO and to conduct counterterrorism operations.
He told the troops that they are reducing the number of servicemen in Afghanistan, stating that the military can do more with fewer people due to its weaponry and capabilities.
But despite the reduction, the U.S. military will be in Afghanistan until there's either a deal with the Taliban or when the United States has won the 18-year war.
"We're going to stay until such time as we have a deal or we have total victory," he said. "And they want to make a deal very badly."
The war in Afghanistan has claimed 147,000 lives since 2001, including 40,000 civilians.