Queensland Nickel was losing $5 million a month and Clive Palmer signed a deal that would strip it of $135 million more, a court has heard.
As Clive Palmer's Queensland Nickel hurtled towards collapse, the ailing company was said to be $25 million in the red and losing $5 million more each a month with creditors circling.
Despite this, in the days before administrators were called to the cash-strapped refinery, a $135 million deal was allegedly signed to pay Clive Palmer ahead of the workers and suppliers.
The "extraordinary" agreement was allegedly made just days before QN let go of 218 workers in January 2016 and last-ditch attempts to secure finance from banks and government failed.
Now, the billionaire businessman is fighting a massive federal government lawsuit over the Townsville refinery's collapse three months later.
Government-appointed liquidators for QN are trying to claw back about $200 million owed to creditors in the Brisbane Supreme Court.
Justice Debra Mullins says the most critical issue in the trial is when QN actually became insolvent.
On Wednesday, the lawyer for the liquidators Graham Gibson said Mr Palmer was a busy man in the days before administrators were called in to take over.
"Interesting things happened with the company China First, which was wholly owned by Mr Palmer," he said during his opening address.
Mr Palmer's wife, Anna, was appointed a director of the company and Queensland Nickel agreed to buy $135 million worth of shares in the company, he said.
Mr Gibson said QN had no money or assets to pay for the shares but the agreement signed had a clause, which prioritised China First's payment ahead of employees and suppliers if the refinery went into administration.
"Prior to the transaction ... the paid-up capital of this company was $2," he said.
"The shares were of no commercial benefit to QN and the China First coal project was worthless, he said.
"There is only one purpose that is evident from this transaction ... that purpose was to prefer the interests of the Palmer parties, Mr Palmer ultimately ... over the interest of all other unsecured creditors," he said.
"Extraordinary is, in fact, an understatement."
Earlier, the court heard QN was trading insolvently months before administrators were called.
Lawyer for the liquidators Shane Doyle said there was evidence QN was approaching insolvency by June 2015 "and was insolvent from the 9th of October onwards".
The court also heard Mr Palmer had "misused" funds from QN.
One of the many payments he directed be made was for $1 million to a person named in Evgenia Bednova in Kyrgyzstan.
Another for $8 million was made to Mr Palmer's father-in-law Alexander Sokolov.
There is no evidence the funds were to pay QN related expenses, Mr Doyle said.
The 280-page claim by the liquidators names 21 defendants, including Mr Palmer's nephew Clive Mensink and a string of Mr Palmer's companies.
The trial continues on Monday.