Pentagon officials say they were moved to strike in the case because they received intelligence that the health of the American aid worker, 32-year-old Jessica Buchanan, was rapidly deteriorating.
"They said it was the time, the opportunity. Jessica's health was failing, and they concluded they should go at this time. The president gave the 'go,'" Vice President Joe Biden said on "Good Morning America."
Buchanan and her Danish colleague, Poul Hagen Thisted, had been held captive for ransom by the pirates since October. They were sent to Somalia to diffuse land mines.
SEAL Team 6 - the same U.S. Navy unit that killed Osama bin Laden - parachuted into Somalia overnight and exchanged gunfire with the kidnappers, killing at least nine pirates.
Officials said at least two military choppers were involved in the raid in Mogadishu, carrying Buchanan and Thisted to an American base in Jabouti.
The highly classified operation, labeled "Octave Fusion," ended just before Tuesday night's State of the Union address. President Barack Obama thanked Defense Secretary Leon Panetta and the military for pulling off the operation.
"Good job tonight," Obama said to Panetta. At the time, no one knew what the president was referring to.
Immediately after the speech, Obama returned to the White House to inform Buchanan's father that she was safe and "on her way home," according to a White House statement.
"The United States will not tolerate the abduction of our people and will spare no effort to secure the safety of our citizens and to bring their captors to justice," the White House said in a statement. "This is yet another message to the world that the United States of America will stand strongly against any threats to our people."
Buchanan's brother Stephen said in a statement, "It is a great day to be an American. We are very proud and very thankful to SEAL Team 6."
Panetta said in a statement that the two hostages were not harmed during the operation, and no U.S. troops were killed or injured.
Several hostages are still being held in Somalia, including a British tourist, two Spanish doctors and an American journalist kidnapped on Saturday.
The Associated Press contributed to this story.