US forces run training programmes for the Afghan army and police
An Afghan soldier shot dead two US coalition troops and wounded a third before turning the gun on himself, a statement from the US military said.
One coalition soldier was killed on the spot, while the other died later of his wounds, the statement said.
"The Afghan National Army soldier reportedly killed himself immediately after the incident," it added. The motive for the shooting is unclear.
Some 70,000 foreign troops are stationed in Afghanistan.
The shootings took place in the north of the country at 1420 local time (1020 GMT).
The US statement quoted Afghan Defence Minister Abdul Rahim Wardak as expressing his sorrow about the incident and promising an investigation.
"It is too early to speculate, but the investigation will bear out the truth," he was quoted as saying, adding that "full corrective action will be taken".
Similar incidents have occurred in the past in Afghanistan, where US forces are responsible for the training of the Afghan army and police force.
The killings came hours before US President Barack Obama outlined his administration's new strategy for Afghanistan, which includes sending 4,000 more trainers to work with the Afghan army.
So far this year, 77 international troops have lost their lives in Afghanistan, mostly in attacks by Taleban insurgents.