"As they responded to the gunfire, reaching and boarding the Quest, the forces discovered all four hostages had been shot by their captors," the US military's Central Command said in a statement.
The military, which said the incident took place at about 6am GMT, had been monitoring the Quest since discovering it had been taken over by pirates for about three days. It said negotiations to secure the release of the Americans had been under way when the gunfire broke out.
The US Embassy in Nairobi on Saturday said a yacht with four Americans on board was hijacked in the Arabian Sea, and was heading toward Somalia.
"Our colleagues called us this morning, that they were being attacked by a U.S. warship," a Somali pirate called Mohamud told Reuters.
"The US warship shot in the head two of my comrades who were on the deck of the yacht by the time they alerted us," he said.
"This is the time we ordered the other comrades inside yacht to react - kill the four Americans because there was no other alternative - then our line got cut."
Neither could say how many of their colleagues were killed, although the US military said two were killed and 13 captured.
Pirate gangs preying on shipping lanes through the Gulf of Aden and the Indian Ocean typically target large merchant ships, with oil tankers and the prize catch, but the snatching of foreigners can also yield high ransoms.