A US ship, the USS Bainbridge, responded to calls for assistance by the Liberty, but the pirates had left by the time it arrived about six hours later, Jack Hanzlik, a US navy captain, said.
It was the second assault in a week on a US-flagged ship in the region.
US snipers killed on Sunday three Somali pirates and freed the US ship captain they had been holding hostage for five days.
Heavily armed pirates from Somalia have been increasingly busy in Indian Ocean shipping lanes and the strategic Gulf of Aden, capturing dozens of vessels and hundreds of hostages.
A flotilla of warships from nearly a dozen countries has patrolled the waters for months. They have halted many attacks but say the area is so vast they cannot stop all hijackings.
Two cargo vessels were captured on Tuesday in the Gulf of Aden, taking at least 22 people hostage, a Nato spokesman said.
The hijackings of a Lebanese-owned freighter and a Greek merchant ship followed eight other hijackings by pirates in the busy shipping lanes of the Gulf of Aden and Indian Ocean - known as the Horn of Africa - since the beginning of April.
Armed men seized the first ship overnight - the Greek-owned MV Irene EM - and took the 22-man Filipino crew hostage.
Hours later, the second vessel, the Togo-flagged MV Sea Horse
, was taken about 140km off Somalia's coast.
Lieutenant-Commander Alexandre Fernandes, a Nato officer, said: "There was only three minutes between the [MV Irene's distress call] and the hijack.
"They attacked at night, which was very unusual. They were using the moonlight as it's still quite bright."
About 260 sailors, including about 100 Filipinos, are currently being held captive by pirates on 19 seized ships.
They can extort $1 million and more for each ship and crew. Kenya estimates they earned $150 million last year.
Omar Abdirashid Ali Sharmarke, prime minister of the UN-backed transitional Somali government, recently told Al Jazeera: "We are actually trying to do our best to try and disrupt the activities before we go to the waters.
"The root cause was always the lack of institutions to deal with dissidents.
"You cannot just contain pirates from the seaside, you have actually to dissolve the bases from the land. You have to prevent them before they go into the waters."
The pirates say they are fighting illegal fishing and dumping of toxic waste in Somali waters.