"Feisal Warsame Mohamed was a good MP... the bomb was attached underneath the seat of his car, it exploded and he died," said Abdi Latif Musa, another member of parliament.
The blast is the latest in a string of attacks in Mogadishu, many of them claimed by Al-Qaeda-linked Shebab insurgents.
The bomb exploded outside the heavily fortified walls of a government building in one of the most secure areas in Mogadishu.
There was no immediate claim of responsibility.
The Shebab have been driven out of fixed positions in Somalia's major towns by a UN-mandated African Union force, but still regularly launch attacks that include bombs and guerrilla-style raids.
On Thursday, at least eight people were killed when a suicide car bomber rammed a convoy in Somalia's northern port of Bossasso.
NJF/NJF