In a country where malnutrition and poverty are still rife, multinationals remove $2bn a year from the economy through tax avoidance. It's legal – but is it moral? And should the government and UK companies take a stand?

On the main road to the home of Zambia Sugar Plc, a large sign advises visitors: "Welcome to Mazabuka – 4km to the sweetest town in Zambia."

Lying around 100km south-west of Zambia's capital, Lusaka, the town has been described by the chief executive of Zambia Sugar's parent company as an island of "relative prosperity" in a country where malnutrition and poverty are still rife.

George Weston, 48, who earns £918,000 a year plus an annual bonus of £864,000 leading Associated British Foods, is right. Jobs created by Zambia Sugar in and around its Nakambala Sugar plantation in the Mazabuka district are vital to local livelihoods.

And it is a growing business, an important part of the Kingsmill bread, Primark clothing, Silver Spoon sugar, Twinings Tea and Ryvita crackers empire. The plantation and factory made record profits in 2012 and is expected to exceed 400,000 tonnes of sugar production this year for its Europe and Africa markets.

But as ActionAid's report into Zambia Sugar's tax arrangements notes: "Even amidst Mazabuka's lush green cane fields, the availability of overstretched public services is sometimes literally a matter of life and death. Such public services rely, of course, on everyone paying their due taxes."

Mazabuka's Nakambala Urban health centre say two malnourished children die every month with it. At the school, 1,200 children fit into 12 classrooms in shifts taught by 20 teachers.

The local public services need cash from the government, and the state is reliant on almost 20% of its income from corporation tax and taxes on money leaving the country. Yet between 2007 and 2012 Zambia Sugar paid less than 0.5% of its pretax profits in corporation tax. Between 2008 and 2010, it paid no corporation tax at all.

The company says "as a direct result of our investment in Zambia since 2008, the availability of substantial capital allowances has led to virtually no corporate tax being payable". It also benefits from other tax reliefs, including one for farmers which it won after taking the government to court in 2007.

But ActionAid's year-long investigation into the complex corporate structure around Zambia Sugar suggests there is a more troubling story behind the numbers. A third of the company's pre-tax profits – more than $13.8m a year – are paid out of Zambia via tax haven sister companies located in countries where taxes have been, currently are, or are likely to be, lower than in the African state.

Before the Zambian taxman gets to it, the company pays large "purchasing and management" fees to an Irish sister company which does not employ a single member of staff, according to its company accounts. Money can flow freely from Zambia to Ireland untroubled by the taxman due to a bilateral treaty.

Associated British Foods says it has repeatedly made accounting errors and it actually has 20 people in Ireland doing "real work". Yet they were peculiarly absent when ActionAid phoned and visited the offices in Dublin to find that neither the telephone operator nor receptionist had heard of the company.

The firm also pays $3m a year to a sister company in Mauritius for access to "trade contacts with customers in the European sugar market, transportation of sugar to Europe, foreign currency management and the availability of cost effective credit terms". Yet when an ActionAid investigator, posing as someone taking a survey of staff, called the director of the Mauritius holding company and asked how many employees they had, he was told: "One … it's me."

The company says that the fees to Mauritius and Ireland are rolled up into their tax liability in South Africa, where they are taxed at 28%. Yet accounts show that in 2011/12 the entire tax liability in South Africa was $308,000 – the equivalent of just 4% of the $7m fees paid by Zambia Sugar to Ireland and Mauritius.

The company says this is because the fees do not provide a taxable profit. It adds that its corporate structure means profits are actually hit with a higher tax rate globally than they would be if left in Zambia. Either way, whatever the motive, or the tax paid elsewhere, that cash is not benefiting Zambians, says ActionAid.

And the complexity of the financial engineering does not end there. To fund its expansion last year, Zambia Sugar borrowed $70m from two commercial banks. The loan is in the Zambian currency kwacha and secured on Zambia Sugar's estate and assets in Mazabuka, and it is repaid via a Lusaka branch of Citibank Zambia.

Yet, on paper, the loan is actually to the Irish subsidiary. Why? ABF told ActionAid: "Interest on loans to Zambia Sugar from such banks would have been subject to [Zambian] withholding tax. The banks would therefore have increased their interest charge to compensate for this."

Finally there is the issue of distributing Zambia Sugar's profits back to its parent company. If the company's immediate owner was in Ireland, dividends leaving that country would be subject to tax.

So Zambia Sugar's immediate owner is a Dutch co-operative. The owners of Dutch "cooperatiefs", in this case companies in Mauritius and Jersey, are classed as members rather than shareholders so the income they receive is not classified as taxable dividends. And under this structure Zambia can only apply a 5% tax on the cash leaving its shores, a smaller rate than normal because of a tax treaty between the Netherlands and Zambia.

ABF told ActionAid that "dividends paid from the Netherlands to Mauritius is taxed at 3%. Had they been paid directly to South Africa there would have been no tax to pay, further demonstrating that this structure was not created to avoid tax".

ActionAid in response notes that dividends paid directly from Zambia to South Africa are taxed in Zambia at 15%, a tax which this structure avoids. "We are not arguing that this structure was entirely created to avoid tax but that it has this effect," ActionAid adds.

None of this, says Sir Malcolm Bruce MP, chair of the Commons select committee for international development, means Associated British Foods is one of the "bad guys". It employs 1,848 permanent and 3,530 seasonal employees, who pay taxes on their wages.

The company is involved in constructing a block for a local girls' school, a road, a radio station and sponsors schools athletics and football clubs, among other initiatives.

But Zambia should not have to rely on charity, Bruce adds. He says: "It is about applying moral pressure and there is evidence that respectable corporations are susceptible to moral pressure.

"I would like to think their board will say: 'Are we really being fair to the Zambians? Should we be paying a bit more tax in Zambia?' The issue it raises with me is that there is a global need for greater transparency and the principle that tax laws and tax treaties recognise that the economic value of what is being taxed is geographically anchored. It is not to say you can't have global headquarters and administration offshored but the profits from the economic activity are taxed in the country.

"It is very difficult, and we will probably never get a system that is any way like perfect, but there are clearly situations at the moment where countries are losing out badly."

Until the Starbucks and Amazon scandals in the UK, tax avoidance simply had not been top of the UK government's list of priorities, let alone that of the rich western states as a whole.

ActionAid says that if multinationals, many of which are respectable in other ways, such as ABF, paid the full tax on their economic activity in developing countries, then countries such as Zambia could truly be in control of their own destinies.

The charity says that rich states, and in particular those that will be represented at the G20 meeting of world leaders in Moscow this week, need to look past handouts, welcome as they are. They need to tackle avoidance of tax, which is "the most important, sustainable and predictable sources of public finance for almost all countries".

Next June the UK will chair the G8, and tax avoidance in developed and developing countries is now top of the agenda.

The challenge has been set – and the signs are that, this time, it may be met.

Nick Clegg, the deputy prime minister, is visiting Ethiopia and Mozambique next week to discuss what is needed and to gather support for Britain's plans for greater transparency and more effective tax regimes. And transparency is not the vacuous concept some may claim it to be, according to Zambia's vice-president, Guy Scott.

Scott, talking to the Observer on Friday, said the key was to know how much was being earned in Zambia and then to find a reasonable estimate for the actual costs of offshore administration and management for firms so that his government could hold the multinationals to account.

Tax avoidance has been a hot political potato in the country with the government estimating it loses around $2bn a year from it, and with the country's mining companies being the biggest culprits. Scott hopes the furore surrounding the issue will prompt some solutions. He said: "It's difficult, but it's a Zambian government priority. The issue is how do you compute all this stuff and expose this. All we can do is what we are doing is tightening up on the auditing of the quantities.

"These things [management fees] do have a price but the question is how much other stuff is going out. So the ministry of finance has announced that he is going to make sure that he captures what is going out. We used to have two very nasty Englishmen working in the tax department here who used to spend their whole time chasing the miners up and down. And catching them out on all sorts of things. That was a long time ago but that is what you need – nasty people. Zambia's problem is that we are too nice."

Saviour Mwamba, a director at the non-governmental Centre for Trade Policy and Development, who has set up the Zambia Tax Platform in Lusaka to push the government for greater scrutiny and efficacy, is more critical of his government.

"What is important to recognise the limited capacity for individual governments, especially Zambian governments to deal with this problem", he said. "So we are trying to push governments to be more committed to work together. One of the things we are pushing for is a review of tax treaties and bilateral investment treaties, but that needs international co-operation.

"The G8 needs to go beyond the usual minimalist changes and look for far-reaching changes that deal with these problems in a meaningful way and move beyond the rhetoric."

ActionAid agrees. It wants ABF and others to make Mazabuka a sweeter place.

To read ActionAid's full report and ABF's full response, go to actionaid.org.uk/taxjustice