The fatalities came early Thursday when the Takfiri group detonated a car bomb at the base for the African Union Mission in Somalia (AMISOM) in the town of Halgan, about 300 km north of Mogadishu.
Local residents said they heard a huge explosion at the base and a heavy exchange of gunfire shortly before dawn.
An al-Shabaab spokesman said 43 African Union soldiers from Ethiopia were killed in the fighting, adding several militants also lost their lives.
The deadly assault is the first such attack on an Ethiopian army base since militants began targeting foreign soldiers deployed in the Horn of Africa state.
Somalia has been the scene of militancy by al-Shabaab since 2006.
The Takfiri terrorist group, which pledged allegiance to al-Qaeda in 2012, has been behind violence and chaos in the African country, targeting key government and security figures.
The African Union mission has deployed about 22,000 peacekeepers to help Somali government forces stabilize the country.
Al-Shabaab has been pushed out of Mogadishu and other major cities by government forces and the AMISOM, which is largely made up of troops from Ethiopia, Uganda, Burundi, Djibouti, Sierra Leone and Kenya.
The mission is estimated to have lost at least 1,100 troops since 2009, Press TV reported.
S/SH 11