The BBC's Mohamed Dhore in Mogadishu says the clashes are in northern areas and unlikely to affect the aid effort.
Thousands have arrived into government-controlled suburbs in search of food.
Correspondents say if the pro-government forces manage to gain more ground this could enable aid agencies to increase the areas where they can deliver food aid to victims of the severe drought.
The WFP delivery is the first airlift of food aid since the UN declared a famine in two southern areas of Somalia last week.
Al-Shabab, the al-Qaeda linked group which controls much of Somalia, has banned the WFP from its areas.
Our correspondent says the fighting started just after dawn when the government and African peacekeeping troops launched an offensive on an al-Shabab stronghold in the north of the city, about 7km (four miles) from the airport.
Continue reading the main story
Lt Col Paddy Ankunda, a spokesman for the 9,000-strong AU force in Mogadishu, said 41 al-Shabab fighters had surrendered during the clashes.
The weak interim government controls about 60% of Mogadishu, including the airport, the port, the presidential palace and areas around the city's largest market.
Tens of thousands of Somalis have fled areas controlled by al-Shabab to Mogadishu and neighbouring Kenya and Ethiopia in search of assistance.
The UN refugee agency said on Tuesday that some 100,000 people had arrived in Mogadishu and settlements around the city in search of food and water in the past two months.
Earlier this week, Somali Foreign Minister Mohamed Ibrahim warned that more than 3.5 million people "may starve to death" in his country.
The WFP aid delivery came in by plane on Wednesday because sending it by boat would have taken months.
Challiss McDonough, a spokeswoman for the WFP, said the 10 tonnes of Plumpy'nut, a peanut-based paste high in protein and energy, would be enough to treat 3,500 malnourished children for a month.
Given the demand for food aid in Somalia, the delivery is just a drop in the ocean, says the BBC's East Africa correspondent Will Ross, in Nairobi, Kenya.
Somalia is thought to be worst-hit by the crisis, but Ethiopia, Kenya and Djibouti have also been affected.
More than 10 million people in the region are thought to be at risk from the worst drought in 60 years.