Lawyers were asked to write a letter on his behalf after Chesterfield High School ended his employment in 2011.
A tribunal ruled Mr Anderson was unfairly dismissed from a senior learning mentor role, but questioned the mayor's use of council lawyers.
Both Mr Anderson and Liverpool City Council have refused to comment.
In his written ruling, handed down on Tuesday, Judge Daniel Serota said a solicitor for Liverpool City Council wrote to Simon Penney, head teacher of the school in Sefton, in 2012 "raising several questions".
He said: "It is unclear to me why the legal department of Liverpool should have been acting on behalf of the Claimant in his private capacity."
Councillor Richard Kemp, leader of the Liberal Democrats in Liverpool, told BBC Radio Merseyside: "There is a clear distinction between the work of mayors and councillors - when we should be supported by the legal departments for what we do - and those things we do in other employment or personal capacities.
"I think it's an error of judgement by the council's legal department to get involved in this issue at all.
"In some ways the cost doesn't matter, it's the principle of this that matters."
During the tribunal, held in London in November, the judge said Mr Anderson started work at the school in 2001 when it was under local authority control.
He stopped working there when he became Liverpool City Council leader five years ago.
The local authority which then controlled the school - Sefton Metropolitan Borough Council - had agreed that he could continue as a staff member under legislation which allows employees to hold public office.
After it became an academy in 2011, though, the tribunal heard Mr Anderson was told his employment "arrangement" was "inequitable".
Bosses said pupils were getting "no benefit" for the £4,500 a year paid to Mr Anderson and so "terminated the agreement".
Mr Anderson maintains his contract was terminated six weeks before his 55th birthday, which significantly affected his pension rights.
BBC News understands the council's legal department only wrote an initial letter, and that Mr Anderson obtained subsequent advice privately.
His appeal was dismissed, with the judge ruling he was not entitled to compensation.
Liverpool Mayor Joe Anderson has been criticised for using council lawyers to start a personal legal battle against a school where he used to work.