The AU mission (Amisom) says it repulsed the attack, killing 110 militants.
Residents in Halgan told the BBC they had heard a huge bang followed by a heavy exchange of gunfire.
Amisom supports the government as it fights to regain control of the country from al-Shabab.
Ethiopia has denied that any of its soldiers were killed.
It is not possible to verify the various claims about how many people were killed.
He said that nine Amisom soldiers had lost their lives.
He said that the attackers had driven a car bomb into the base.
- 21 April: Six Ethiopian troops killed in blast in Bay Region
- 22 February: 15 Ethiopian troops dead in clashes in Lower Shabeelle
- 15 January: Scores of Kenyan troops killed in an attack on base in El Adde
- 1 September: More than 20 killed in suicide attack on base in Janale, including at least 12 Ugandan troops
- 26 June: At least 50 Burundian troops killed in attack on base near Mogadishu
- 20 October: 70 Amisom and Somali troops killed in clashes in Mogadishu
In January, al-Shabab targeted a Kenyan base in el-Ade, southern Somalia.
It said it had killed more than 100 soldiers but the Kenyan authorities have not confirmed the death toll.
Al-Shabab has also attacked Amisom bases run by troops from Burundi and Uganda.