The attack happened in the same region where a US air strike killed up to 17 civilians last week, according to the US military.
No one was wounded in the alleged assault on Tuesday near Asadabad town in Kunar province, a military statement said on Wednesday. It added that US forces used mortars to respond and the insurgents fled.
"It's incredible to us that the enemy would attack our forces while we are providing innocent Afghans with health care," US military spokesman Lieutenant-Colonel Jerry O'Hara said.
However, it has not been possible to independently verify the American version of events.
The US air strike on Friday was also in Kunar and targeted a known "terrorist base", the US military said.
It was not possible to verify the US claims, but an Afghan government spokesman said the deaths of the civilians, including women and children, could not be justified.
It was unusual criticism from the government of President Hamid Karzai, often viewed by critics as an American puppet.
The US provides security for the president as well as hundreds of millions of dollars a year in aid to Afghanistan.
"It's incredible to us that the enemy would attack our forces while we are providing innocent Afghans with health care"
Lieutenant Colonel Jerry O'Hara,
US military spokesman
The reprimand highlighted Afghan government concern that deadly mistakes could erode support for the US presence in the country.
In the past, Karzai's government has expressed interest in a long-term US military presence in the region as Afghanistan struggles to recover from nearly a quarter-century of war.
US forces, meanwhile, spent an eighth day scouring mountains in Kunar searching for the final member of a four-man Navy SEAL commando team that went missing on 28 June.
"We're, of course, doing everything we can to find the last of the four SEALs. And it's a real priority, and something the president asked to get briefed on this morning," US National Security Adviser Stephen Hadley said.
Critics see Karzai as a US puppet
One SEAL has been rescued, while the bodies of two others were recovered on Monday and taken to Bagram, the main US base in Afghanistan, a US military statement said.
A transport helicopter sent in to rescue the four was shot down the day the team went missing, killing all 16 US servicemen aboard.
Military spokesman O'Hara said rescuers searching for the final missing team member were "still hopeful", adding, "until you know otherwise, you have to assume he is alive".
A US military statement said the rescued serviceman was receiving medical treatment for "non-life-threatening injuries" at the Bagram base.