The number of attacks by Somali pirates has fallen over the last two years due to increased naval patrols and the presence of well-armed security teams on ships. However, 38 crew members remain in captivity, the U.N. said.
The 11 men freed on Friday were crew on Malaysian-owned cargo vessel MV Albedo which was hijacked 900 miles (1,500 kms) off Somalia in November 2010 while sailing from the United Arab Emirates to Kenya.
"They are all healthy," said Abdi Yusuf Hassan, the interior minister of Galmudug region. He said no ransom was paid.
MV Albedo's 23-man crew was made up of sailors from Pakistan, Bangladesh, Sri Lanka and Iran when it was seized.
Seven of the ship's crew were released in 2012 while four others drowned when the ship sank last year.
Media reports have suggested one hostage was killed soon after the vessel was hijacked.
Nick Kay, the U.N.'s envoy to Somalia, said the 11 crew have been flown to Kenya and will be sent back to their respective countries in coming days.
"I remain deeply concerned that 38 other crew members are still being held hostage by Somali pirates," Kay said in a statement.
"I call on those who continue to detain these crew members to release them without further delay so they can rejoin their families and loved ones."
(Writing by Drazen Jorgic; Editing by Sophie Hares)