The AU says that three peacekeepers and five Islamist gunmen were killed in the ensuing battle, which saw the gunmen infiltrate the base in Mogadishu.
Sheikh Ahmad Umar Abu Ubaidah has replaced slain Al-Shabab leader Ahmed Godane, who was killed in a US air strike.
Militant group al-Shabab has claimed responsibility for an attack which the United Nations has called an "attack against the people".
A failed raid in Somalia and anger at the capture of an al-Qaeda leader in Libya has focused on the US's problems in its fight against militants.
The British Foreign Office has confirmed that a British man has been arrested in Kenya following the siege at Westgate mall that has left dozens dead.
At least 16 people were killed as two car bombs exploded outside the law courts in Somalia's capital Mogadishu and gunmen stormed the building.
Two suicide bombers walked into a restaurant in central Mogadishu and killed at least 15 people on Thursday, police said.
Al-Shabab militants are advancing towards the port city of Kismayu, raising fears of a bloody clash with African Union soldiers.
Ethiopian troops and clan militia fighters forced al-Qaeda-linked militants to flee a Somali town after heavy clashes on Saturday.
Somalia has banned foreign aid workers and journalists from entering areas controlled by al-Shabaab insurgents, in fear of attacks on them.