The two were convicted of the killing of Mohammed Mohamud Tima Adde, a reporter for the UK-based Universal TV, who was shot in his car by gunmen a year ago.
Somalia is one of the most dangerous places in the world for media workers. Last August authorities executed a man, also convicted of killing journalists.
The country is attempting to emerge from decades of conflict and faces an insurgency by al Qaida linked militants known as al Shabab.
The US State Department declared al Shabab a terrorist organisation in February 2008.