The incident is being investigated.
The so-called "green-on-blue" attack is the latest in a series of incidents in which Afghan forces have turned their weapons on worldwide troops with whom they are working.
North Atlantic Treaty Organisation did not release the identity of the American soldier killed or provide further details about where the incident took place.
A Taliban spokesman said in a statement that the attack occurred at an airbase in Tarinkot, capital of Uruzgan province.
The Taliban said in a statement that "conscientious" Afghan soldiers had shot foreign soldiers in the south-central Uruzgan province, according to the SITE Intelligence Group monitor.
The Taliban have been battling USA -led North Atlantic Treaty Organisation forces in an attempt to restore their version of strict Islamic law in the country after being toppled by a US -led campaign in 2001.
On New Year's Day, a US soldier was killed and four others wounded in combat operations in the eastern province of Nangarhar.
The last insider attack occurred in August of 2017.
During his confirmation hearings, Secretary of State Pompeo viewed the USA role in Afghanistan as a "humble" mission with an "objective of leaving", but not before threats to American security from the region have been neutralized and the Afghan government is stabilized.
The Pentagon has identified the soldier killed in an apparent insider attack Saturday in Afghanistan as Army Cpl. Afghan commandos carried out the operation with support from US special forces and air power. In the six months prior to June, there were two USA military deaths due to hostile actions and 22 US military personnel wounded, according the DoD report.