An ATO whistleblower says revealing the truth has destroyed his health and finances.

Former Taxation Office intelligence analyst Ron Shamir was sacked from his public service job last year after he raised allegations that his bosses were acting unlawfully and unjustly.

Mr Shamir said senior tax office officials were inappropriately branding taxpayers as cheats and ID fraudsters.

Mr Shamir handed over a dossier of evidence to the taxation watchdog, the Inspector-General of Taxation, last year. It detailed allegations that the ATO was running illegal “covert operations” against innocent taxpayers on an unknown scale.

Documents obtained under freedom of information from the ATO show Mr Shamir warning his bosses in 2012 about the ATO’s overzealous response to a court decision that reduced its powers to withhold tax refunds.

The ATO is accused of secretly cancelling large numbers of tax refunds on the basis of a misleading and unproven justification that they were victims of “ID takeover” by an “unknown third party”.

Mr Shamir is trapped in a legal struggle with his former bosses as they unleash the might of the Commonwealth government to silence him.

While neither side can say much about the ongoing case, the Fair Work Commission has previously ruled that Mr Shamir’s sacking was indefensible, harsh, unfair and unreasonable.

Mr Shamir says his legal battle with the ATO has left him $200,000 in debt and harmed his health, just for doing his job.

Senator Nick Xenophon says the case shows why protections for whistleblowers must be improved.

“Here's a man who has always wanted to do the right thing, at all times Ron was motivated by the highest standards of integrity and ethical behaviour,” Senator Xenophon told Fairfax.

“He's been involved in a Kafka-esque nightmare, a dispute that has been a legal nightmare for Ron, and the law lacks clarity and certainty for those who speak out in the public interest.”

Senator Xenophon said it was just the latest evidence for a national Independent Commission Against Corruption.