Adan Sheik Abdi was tied to a pole and blindfolded when he was executed at the Mogadishu Police Academy, Garowe Online reported.
The execution was the first of an al-Shabaab member by the Somali federal government. The group, which has ties to al-Qaida, is battling for control of the country.
Hassan Yusuf Absuge, who worked for Radio Maanta in Mogadishu, was killed in the capital in September. A spokesman for the military court said three witnesses linked Abdi to the killing.
Exploding whale video goes viral on Internet
Wisconsin business offering 'therapeutic cuddling' forced to close