The elite serviceman was the third American to be killed in direct combat since a U.S.-led coalition launched a campaign in 2014 to "degrade and destroy" Islamic State and is a measure of its deepening involvement in the conflict.
"It is a combat death, of course, and a very sad loss," U.S. Defense Secretary Ash Carter told reporters during a trip to Germany.
A U.S. defense official, speaking on condition of anonymity, said the dead serviceman was a Navy SEAL.
The SEALs are considered to be among the most able U.S. special operations forces and capable of taking on dangerous missions. The serviceman's identity and rank were not disclosed by the Pentagon.
The governor of the U.S. state of Arizona, Doug Ducey, identified the slain serviceman as Charlie Keating IV, and said Keating had attended high school in Phoenix.
The San Diego Union-Tribune newspaper, in southern California, cited unnamed SEALs and their family members in reporting that Keating was the grandson of Charles Keating Jr., a banker who played a leading role in the U.S. savings and loan scandal of the 1980s that embroiled five U.S. senators.
A senior official within the Kurdish peshmerga forces facing Islamic State in northern Iraq said the man had been killed near the town of Tel Asqof, around 28 kilometres (17 miles) from the militant stronghold of Mosul.
The Islamic State insurgents occupied the town at dawn on Tuesday but were driven out later in the day by the peshmerga. A U.S. military official said the coalition had helped the peshmerga by conducting more than 20 air strikes with F-15 jets and drones.
The official, speaking on condition of anonymity, said the Navy SEAL was killed "by direct fire" while on a mission to advise and assist local forces in Iraq.
Carter's spokesman, Peter Cook, said the incident took place during an Islamic State attack on a peshmerga position some 3 to 5 km behind the forward line.
SNIPERS AND SUICIDE BOMBERS
In mid-April the United States announced plans to send an additional 200 troops to Iraq and put them closer to the front lines of battle to advise Iraqi forces in the war against the Islamic State militant group.
Underscoring the complicated nature of the U.S. role in Iraq, the White House told reporters that even though the serviceman died in a combat situation, he was not on a combat mission.
"He was not on the front lines. But he was two miles away, and it turns out that being two miles away from the front lines between Iraqi forces and ISIL is a very dangerous place to be," said White House spokesman Josh Earnest, using an acronym for Islamic State.
Last month, an Islamic State attack on a U.S. base killed Marine Staff Sergeant Louis Cardin and wounded eight other Americans providing force protection fire to Iraqi army troops.
Such Islamic State incursions are rare in northern Iraq, where the Kurdish peshmerga have pushed the militants back with the help of coalition air strikes and set up defensive lines that the militants are rarely able to breach.
The leader of a militia deployed alongside peshmerga in Tel Asqof said the insurgents had used multiple suicide bombers, some driving vehicles laden with explosives, to penetrate peshmerga lines.
The Kurdistan Region Security Council said at least 25 Islamic State vehicles had been destroyed on Tuesday and more than 80 militants killed. At least 10 peshmerga also died in the fighting, according to a Kurdish official who posted pictures of the victims on Twitter.
The peshmerga also deflected Islamic State attacks on the Bashiqa front and in the Khazer area, about 40 km west of the Kurdish regional capital Erbil, Kurdish military sources said.
The Islamist militants have been broadly retreating since December, when the Iraqi army recaptured Ramadi, the largest city in the western region. Last month, the Iraqi army retook the nearby region of Hit, pushing the militants further north along the Euphrates valley.
But U.S. officials acknowledge that the military gains against Islamic State are not enough.
Iraq is beset by political infighting, corruption, a growing fiscal crisis and the Shi'ite Muslim-led government's fitful efforts to seek reconciliation with aggrieved minority Sunnis, the bedrock of Islamic State support.