Abduwali Abdukhadir Muse was caught in 2009 after a clash in which Somali pirates seized the US merchant ship Maersk Alabama, and took a US merchant captain hostage.
Muses's lawyers argued that he was in his mid-teens when he committed the crime and had been the victim of a poverty-stricken life.
However, a judge ruled that there was enough evidence to prove that Muse was over 18 and so should be tried as an adult.
Prosecutor Preet Bharara said during the trial that Muse terrorised the captain and the crew.
“Now he will pay for those five days and the events leading up to them,” said Bharara.
Piracy, and especially hostage-taking, has shown a steady rise since 2006, according to the International Maritime Bureau.
Somalia is a crucial approach route to and from the Suez Canal. The problem is exacerbated by the country's unstable political situation.
Last weekend, Somali pirates are suspected to have captured a large cargo vessel near Oman with 13 Iranian and 10 Indian crew on board, according to European naval forces.
Somalia has not had a stable government since the civil war ended in 1991.