Mohamud plans to officially launch the second phase of the campaign in coming days from the central town of Dhusamareb, where thousands of troops are gathering before being deployed to the frontlines.
The first phase began in August last year, with the military rallying behind clan-based militias in central Somalia.
That rare collaboration helped produce the most significant territorial gains against the militants since the mid-2010s, but al Shabaab has continued to stage deadly attacks against military and civilian targets.
The second phase is meant to push into southern Somalia, the traditional stronghold of al Shabaab, which has been waging a brutal insurgency against the government since 2006.
"We want to eliminate al Shabaab from the country in the coming five months," Mohamud said at a town hall meeting in Dhusamareb on Thursday evening.
"If we do not clear them out completely, then maybe there will be few pockets with a few harmless al Shabaab that cannot cause problems."
Security analysts are sceptical of vows to eradicate the group, saying it has deep roots in communities across the country, while government forces have limited experience and capacity.
The militants have moved back into some rural areas that government forces captured during the first phase and have inflicted heavy losses on their enemies.
They killed at least 54 Ugandan peacekeepers in a raid in May, and at least 30 Somali soldiers in July in a suicide attack on a military academy in the capital Mogadishu.
(Reporting by Abdi Sheikh; Writing by Hereward Holland and Aaron Ross; Editing by Nick Macfie)