A group of 24 marines swooped on the German-owned M/V Magellan Star and took control of the ship from nine pirates who had captured it on Wednesday.
There were no casualties during the pre-dawn raid, the US Fifth Fleet said.
Control of the vessel has been returned to the crew, who were unhurt after they managed to seal themselves in a safe compartment when the pirates struck.
Second ship released
Lt John Fage, of the US Fifth Fleet headquarters in Bahrain, said the operation took about an hour and there were no injuries among the marines. "There were no shots fired," he said.
Nine suspected pirates were taken into custody, Lt. Fage added.
US warships are part of a 25-nation mission protecting merchant vessels from pirate attacks off the coast of Somalia and into the Gulf of Aden.
The task force often opens fire on suspected pirates, but boarding raids are rare.
In a separate incident on Thursday, a group of Somali pirates have released a Bulgarian-flagged ship they seized in May, the Bulgarian foreign ministry said.
The chemical tanker Panega, with 15 Bulgarian crew, was seized about 160km (100 miles) east of the Yemeni port of Aden in May.
via BBC News - US Marines capture ship hijacked by pirates off Somalia.