U.S. envoy Zalmay Khalilzad had a preliminary peace deal with the Taliban, but a surge in Taliban violence and the death of an American soldier last month prompted Trump to cancel a secret Camp David meeting where the peace deal would have been finalized. He declared the tentative agreement dead.
"The aim is to still get a peace agreement at some point, that's the best way forward," said Esper. He visited Afghanistan in his previous job as U.S. Army secretary.
He would not say how long he believes it may be before a new peace accord could be achieved.
A month after the peace agreement collapsed, Khalilzad met with Taliban in early October in Islamabad, Pakistan, but it was not clear what progress, if any, was being made.
Esper's arrival in Kabul came as Afghan government leaders delayed the planned announcement of preliminary results of last month's presidential election. Esper met with Afghan President Ashraf Ghani and other government officials.
House Speaker Nancy Pelosi was visiting Afghanistan with a congressional delegation at the same time.
Her office said in a statement Sunday night the bipartisan delegation met with top Afghan leaders, civil society representatives and U.S. military chiefs and troops serving there. Pelosi says the delegation emphasized the importance of combating corruption and ensuring women are at the table in reconciliation talks.
Both Ghani and his current partner in the unity government, Chief Executive Abdullah Abdullah, have said they believe they had enough votes to win. The Sept. 28 vote was marred by widespread misconduct and accusations of fraud.
Officials said the announcement of preliminary results has been delayed due to problems with the transparency of the process, delays in transferring ballot papers and delays in transferring data from a biometric system into the main server.
Esper planned to meet with his top commanders in Afghanistan as the U.S. works to determine the way ahead in the 18-year war.
Trump, since his 2016 presidential campaign, has spoken of a need to withdraw U.S. troops from the "endless war" in Afghanistan. He has complained that the U.S. has been serving as policemen in Afghanistan, and says that's not the American military's job.