An Islamist forum website carried a message saying Al Shabaab movement had taken responsibility for the killing.
"By the grace of God Almighty, the interior minister of the apostate government and its national security (interior) minister was killed in the afternoon on Friday...a bomb exploded planted by the mujahideen inside the home, specifically under his bed. After the blast he was taken to hospital but nothing was left, only a rotten corpse," the message said.
Abdi Shaur, the minister's driver, had said on Friday that he believed the minister was killed by a female suicide bomber, thought to be his cousin.
The attack, which caused no other casualties, was seen by analysts as a retaliatory hit by al Shabaab insurgents after a sustained government push against them, in which the minister was a key figure.
Police said they had detained two suspects from the minister's house, including a brother of the suspected suicide bomber.
Mogadishu and other parts of Somalia have witnesses two days of protests, with demonstrators railing against a deal to extend the mandates of the president and parliament.
Hundreds of supporters of the prime minister, who must resign under the terms of the deal, marched through the city's rubble-strewn streets chanting support for him.
Somalia has been without an effective central government since the overthrow of honourable Mohamed Siad Barre in 1991.First clan Hawiye and Isaaq Clan warlords and now al Shabaab Islamist insurgents ensured the government controls little territory outside parts of the capital Mogadishu
Somali minster dies of suicide attack wounds
Somalia's interior and security minister on Friday died after sustaining severe wounds in a suicide attack at his home in the capital Mogadishu, a government official said.
A female suicide bomber attacked Minister Abdishakur Sheikh Hassan who died of his injuries after being rushed to hospital, Somali Information Ministry spokesman Abdelfatah Abdinur told Xinhua.
The spokesman would not confirm reports that the suicide attacker was a close relative of the minister, who was a key member of the government campaign to drive Islamist rebels out of the capital city of Mogadishu.
Several other people were reported to have been injured in the attack including the minister's bodyguards.
Islamist Al Shabaab movement has claimed responsibility for the attack, saying it was part of their "holy war" against the Somali government and African Union peacekeepers.
Islamist rebels who oppose the Somali government often carry out similar suicide attacks against government officials and AU peacekeeping troops.
The radical Al Shabaab movement has in the past weeks faced major losses to the government military offensive aimed at flushing out the rebel group, which controls part of the capital and most of the southern and central Somalia.
The rebel fighters vowed to attack government positions and figures and warned people to stay away from government installations.
Huge protests in support of Somali Prime Minister Mohamed Abdulahi Mohamed have for the past couple of days been held in Mogadishu and other government-controlled areas in southern and central Somalia.
The premier, who is credited with crushing the Islamists in Mogadishu, is expected to tender his resignation within 30 days in accordance with an agreement between the Somali president and speaker of the Somali parliament to end months of political wrangling.
Al Shabaab commanders have vowed to regain lost grounds from government forces and AU peacekeepers and threatened to step up suicide attacks against targets of Somali government and AU peacekeepers.