The U.S. is now consulting with its NATO allies on the proposal, Esper added.
There are 17,000 NATO-member or partner country personnel engaged in Afghanistan, training local troops and building up their capacities.
The U.S. has more than 12,000 troops in the country, and has been eyeing a one-third cut.
U.S. and Taliban negotiators have held at least 10 rounds of direct talks in the past year and a half.
In September, the two sides were close to signing a deal when Trump abruptly canceled the talks, citing a Taliban killing of a U.S. soldier.
The talks were reopened in December following an Afghan-Taliban prisoner swap.
NATO was also given the green light from Baghdad to boost its separate, roughly 500-personnel-strong Iraq training mission for local forces fighting Islamic State, according to the alliance's Secretary-General Jens Stoltenberg on Thursday.
The Iraqi parliament voted to expel foreign troops from their country in anger over the U.S. assassination of a top Iranian military commander on their soil last month which they argued violated their sovereignty.
"(Baghdad nonetheless) confirmed to us their desire for continuation of the NATO training, advising and capacity-building activities for the Iraqi armed forces," Stoltenberg said.
The 29 allied ministers agreed on the move in principle on Wednesday, the first day of the meeting, pending Iraqi approval.
The government also gave their consent for the potential expansion of NATO's activities in Iraq, diplomatic sources told dpa.
Esper said that a number of NATO allies had agreed to boost the number of troops for the Iraq mission, allowing the US to cut back, but declined to name them.
U.S. President Donald Trump wants the other 28 defense alliance members to assume more responsibility for shared security in the Middle East.
(c)2020 Deutsche Presse-Agentur GmbH (Hamburg, Germany)
Visit Deutsche Presse-Agentur GmbH (Hamburg, Germany) at www.dpa.de/English.82.0.html
Distributed by Tribune Content Agency, LLC.