Islamist fighters beheaded some of the captured Somali soldiers after briefly taking over the camp, witnesses told AFP news agency.
At least 50 Burundian soldiers died last week in an al-Shabab attack on an African Union military base.
Al-Shabab is battling Somalia’s government for control of the country.
The African Union Mission in Somalia (Amisom) has more than 20,000 troops in the country.
Amisom is now withdrawing from some of its smaller outposts in southern Somalia, residents have told the BBC Somali service.
Amisom has not commented on the reports.