Some 1,000 soldiers backed up by 20 tanks captured three al-Shabaab bases, a senior security official said.
African Union forces backing the government say they have advanced outside the capital for the first time.
Al-Shabaab is under attack on several fronts, with troops from Kenya and Ethiopia also gaining ground recently.
Correspondents says this is the biggest joint offensive by the government and the AU force, Amisom, since August 2011.
Troops from Djibouti have recently arrived in Mogadishu to bolster Amisom’s 12,000 soldiers, while the AU is asking the UN to approve a further 50% increase in troop numbers.
Al-Shabaab controls many southern and central areas of the country.
The al-Qaeda linked group made a “tactical withdrawal” from most of the capital last year but has continued to stage suicide attacks in the city.