The US State Department said in a travel advisory on Tuesday that it had "ordered the departure from US embassy Kabul of US government employees whose functions can be performed elsewhere."
The US will begin a complete withdrawal of some 2,500 ground troops from Afghanistan in early May.
The acting US ambassador in Kabul, Ross Wilson, said that Washington issued the advisory "in light of increasing violence and threat reports in Kabul."
The order, he said, affected an unspecified "relatively small number" of employees and the embassy would remain operating.
"Personnel who are urgently needed to address issues related to the drawdown of US forces and the vital work we are doing in support of the Afghan people will be able to remain in place," Wilson wrote on Twitter.
The travel advisory also renewed warnings for Americans not to visit Kabul.
It said that "terrorist and insurgent groups continue planning and executing attacks in Afghanistan."
Earlier this month, US President Joe Biden announced he would withdraw all troops from Afghanistan by September 11.
The US attacked Afghanistan in 2001, claiming that the Taliban were harboring al-Qaeda. The invasion removed a Taliban regime from power but prompted widespread militancy and insecurity across the Asian country.
The war has taken countless lives, including of Afghan civilians.
The Taliban have threatened to resume attacks against foreign troops in Afghanistan if Washington fails to meet a May 1 deadline agreed between the militants and the former US administration.
Meanwhile, Zalmay Khalilzad, the US special envoy to Afghanistan, warned the Taliban against trying to seize power militarily from the Afghan government.
"There is remarkable consensus within the region and the international community against a military takeover by the Taliban," Khalilzad told a US Senate Foreign Relations Committee hearing.
US Secretary of State Antony Blinken also warned that the US withdrawal from Afghanistan could create a vacuum that would lead to civil war or another Taliban takeover.
Blinken told CNN that, "No one has an interest in renewed civil war in Afghanistan, certainly the Afghan people don't."
Blinken stressed that even as the US was withdrawing its forces from the Asian country, it was "not disengaging from Afghanistan."
"We're remaining deeply engaged in the diplomacy, in support for the Afghan government and its people, development, economic assistance, humanitarian assistance, support for the security forces," he claimed.
Meanwhile, the US military has deployed at least four B-52 bombers to Qatar to stand by for potential operations in Afghanistan, where the US is concerned the Taliban may launch attacks.