Mohamed Mohamud Timacade, a reporter with London-based Somali-language Universal TV, was shot several times in the neck, chest and shoulder.
The attackers sprayed the reporter's car with bullets.
"The journalist was shot and seriously wounded... he has been rushed to hospital," said Mohamed Ilkayare, a police officer who was at the scene of the attack.
Timacade was taken to Mogadishu's Medina hospital, which specialises in trauma surgery.
"He was rushed into surgery with several gunshot wounds in the chest and neck," said Ayan Mohamed, a medical worker at the hospital.
Eighteen media professionals were killed in Somalia in 2012 -- the east African country's deadliest year on record, according to Reporters Without Borders (MSF) -- and more than 50 have been killed in the last six years.
At least six media workers have been killed this year.
Attacks on journalists are often blamed on Islamist Shebab fighters battling the internationally-backed government, but some are also believed to be linked to a settling of scores within the multiple factions in power.
Somalia's journalist union condemned the "heinous assassination attempt" and called for blood donations with the reporter due to undergo further rounds of surgery.
"We condemn this shocking attack... another direct attack against the free media in Somalia," union secretary-general Mohamed Ibrahim said in a statement, calling for an investigation to catch the attackers. – AFP