Mark Irvine, the union's head of local government, said both councils had deliberately set up arm's-length leisure service companies with charitable status as a means of reducing business rate and VAT liability.
'In other words, large scale tax avoidance is the driving force behind externalisation which puts local authorities, as direct providers of services, at a distinct disadvantage,' he wrote in a letter sent to local government minister Malcolm Chisholm and to Mr Brown.
Mr Irvine denied to LGC that he was raising the stakes in a battle with Keith Geddes, leader of Edinburgh City Council and president of the Convention of Scottish Local Authorities, over the future of local government service provision.
In a speech earlier this month, Mr Geddes said best value implied a move away from direct service provision to focus on core services only.
'Should we allow our DSOs and DLOs to set themselves up as independent companies separate from local government and competing in and with the private sector?'
Mr Geddes asked. 'With the introduction of a minimum wage and the government's decision to sign up to the European Social Chapter, is it any longer necessary for DLOs and DSOs to have the protection of being part of local government?'
Mr Irvine accused Mr Geddes of ignorance - a minimum wage of£3.50 would do nothing to protect local government employees with their£4 minimum, for example.
Edinburgh City Council was unavailable for comment.