HM Revenue and Customs is seeking to get back £4.1m of VAT rebates which it believes were wrongly paid to Audit Scotland, who are understood to have recouped the tax incurred by external companies that it contracted in to do audit work.
It will also hit Audit Scotland with interest and penalties for a second VAT debt of about £160,000, liable on income earned by contracting out its own staff to other public bodies.
The debt could have a knock-on effect for local authorities, which could see their fees for audit work increased by around 5%.
Auditor General for Scotland, Caroline Gardner, said the issue related to the former Accounts Commission for Scotland, which merged with the National Audit Office in 2000 to form Audit Scotland.
She said: "Before the merger, the Accounts Commission had what is called Section 33 status, which enabled it to reclaim input tax on the audit fees charged to local government. We discussed with HMRC's predecessor body about continuing that status, since the Accounts Commission's responsibilities were unchanged."
Since 2006, Audit Scotland has been recovering the VAT on behalf of the Accounts Commission, but HMRC has now challenged this arrangement.
Ms Gardner said the options were asking the Scottish Commission for Public Audit for funding or recovering it through local government fees, "neither of which is palatable".
A spokesman for HMRC said: "For legal reasons, we cannot comment on the affairs of individual businesses."