The court found that Abdirisak Mohamed Barow, 28, and Hassan-Nur Ali Farah, 37, killed Hindiya Haji Mohamed, the journalist working for Radio Mogadishu and National Television on December 3 last year, Xinhua reported.
The execution by firing squad occurred at a field in General Kahiye Police Academy in Mogadishu.
"Barow and Farah, were sentenced to a death penalty on March 20 and they are executed for their involvement and killing of the journalist, Hindiya Haji Mohamed," said one of the prosecutors.
The prosecutor added that the executed men were members of the Al-Shabaab militant group.
Hindiya was killed early December in 2015 while her husband, who was also a journalist for the same station, was killed on September 20 in 2012.
Somalia is considered to be one of the worst places where journalists operate. More than 25 journalists have been murdered in Somalia since 2007, according to data from the Committee to Protect Journalists.(IANS)