The Iraqis were killed on Wednesday when they drove towards a building occupied by the marines.
"A pickup truck drove towards the building. Iraqi soldiers waved at it to stop but they didn't stop. They didn't pay attention. They turned around, and that's when we shot them," said Major Richard Seagrist.
There were no US casualties.
A column of tanks and armoured vehicles rolled into the town, 240km west of Baghdad on the Euphrates river, before dawn and were immediately ambushed.
Marines responded with heavy machine gun fire and several tank rounds.
"We were hit by an IED (improvised explosive device), a daisy chain (three IEDs linked together) and then we took a rocket-propelled grenade," said Sergeant Larry Long.
The offensive was part of Operation River Blitz, launched this week to tackle fighters hiding out in the huge western province of al-Anbar that stretches to the borders with Syria, Jordan and Saudi Arabia.
"The situation in al-Anbar has gone too far, which is why we enacted River Blitz. We don't want to present a weak spot to the insurgents," Lieutenant-Colonel Greg Stevens of the 1st Marines Expeditionary Force told his troops on Tuesday.
"Our intent was to come out to the city, own the terrain and disrupt their activity. We're here to make them do something, and if they get scared, pack up and leave, that's disruption"
"We're going into the city and we're staying."
Haqlaniya has been a focal point of anti-US activities for months. Four marines were killed in an ambush near the town in January.
The US military said it was expecting strong resistance from foreign fighters who they say have links to al-Qaida.
"You don't bring a rifle to a tank fight," Stevens said on Wednesday when asked about the relative lack of resistance from fighters.
"We're going into the city and we're staying"
Lieutenant-Colonel Greg Stevens
"Our intent was to come out to the city, own the terrain and disrupt their activity. We're here to make them do something, and if they get scared, pack up and leave, that's disruption."
Iraqi soldiers working with the US forces were given the job of clearing Haqlaniya's two mosques in an effort not to offend Muslim sensibilities.
US forces took up positions in two schools and planned to stay for about 24 hours.