The marines were killed in Kunar province, which borders Pakistan, on Thursday evening, said military spokeswoman Master Sergeant Cindy Beam.
She said the wounded marine was hurt by gunfire, but she said she did not know how the two were killed.
The attack happened in a mountainous district called Naray close to the border with Pakistan, residents there said. They said they saw the bodies of the two marines and they appeared to have been shot with AK-47 assault rifles.
Muhammad Zaman Malang, a top military commander in Kunar's capital Asadabad, said the marines came under fire as they were moving through a valley.
"They were going up on foot and were fired on with heavy and light machineguns," he said.
"They were going up on foot and were fired on with heavy and light machineguns"
Muhammad Zaman Malang,
military commander, Asadabad
Malang said the US patrol called in air support and US aircraft dropped bombs, but it was not clear if any attackers were hit. He said the planes were again circling on Friday.
He said the ambush could have been the work of fighters loyal to regional commander Gulbuddin Hekmatyar, the Taliban or al-Qaida, all of whom are active in the area.
The deaths took to 59 the number of US personnel killed in combat in Afghanistan since US-led forces overthrew the Taliban for sheltering Usama bin Ladin's al-Qaida after the September 11 attacks.
Karzai seeking more security
The Taliban and their allies have declared war against US-led forces and clashes have mounted as September elections approach.
News of the latest US deaths came as NATO's military chief General James Jones was visiting Kabul and heard pleas for the alliance to make good its pledge to send more troops to protect the elections.
In a meeting in Kabul, President Hamid Karzai told Jones extra security was needed to ensure what are billed as the country's first free polls could be held on time.
At a summit in Istanbul next week, NATO is to announce that its 6,400-strong peacekeeping force will take command of four or five military-civilian reconstruction teams in northern Afghanistan and deploy about 1,200 troops for the polls.
But this will fall short of at least 5,000 extra troops the United Nations and Kabul have estimated will be needed. The deployments will also be to relatively secure provinces, not to the south and east, where fighters are most active.