A former Labour MP tried to claim up to £30,000 in taxpayers' cash to fund a "significant cocaine habit", prosecutors have said.
Jared O'Mara, 41, was in "poor mental health" at the time and abusing the class A drug in "prodigious quantities", Leeds Crown Court heard.
A friend, charged alongside him, believed the politician was suffering a "severe psychotic episode" and feared a conspiracy against him.
It is claimed that O'Mara, who represented the Sheffield Hallam constituency between 2017 and 2019, submitted "dishonest" invoices to the Independent Parliamentary Standards Authority (Ipsa).
Jurors were told he made four claims between June and August 2019 from a "fictitious" organisation called Confident About Autism SY.
They also heard he submitted two invoices from his "chief of staff", Gareth Arnold, for media and PR work. Prosecutors say that work was never carried out.
O'Mara, who appeared in court by videolink on Monday, is also accused of submitting a false contract of employment for his friend John Woodliff, saying that Woodliff worked for him as a constituency support officer.
O'Mara is charged with eight counts of fraud by false representation.
Arnold is jointly charged with six of the offences, while Woodliff is jointly charged with one.
Setting out his argument, prosecutor James Bourne-Arton said Arnold and Woodliff were "old friends of Jared O'Mara and sadly were persuaded to go along with his dishonest claims".
In the summer of 2019, however, Arnold contacted South Yorkshire Police after "reaching a point at which he was no longer willing to participate in the fraud", the court heard.
In a phone call played to the jury, Arnold said: "It's a bit of a tricky one, but yesterday I spoke to the 999 service and the mental health crisis team about my employer, who I believe is suffering a severe psychotic episode and has delusions of a conspiracy against him.
"I also believe he has been submitting fake expense claims to the government very recently."
The allegedly fraudulent invoices included £19,400 for support from Confident About Autism SY, and £4,650 for Arnold.
Mr Bourne-Arton said Confident About Autism SY was an "invention of Jared O'Mara that he hoped to slip through as a legitimate claim, no doubt seeking to hide behind the fact that it related to his disability if ever challenged".
There is no evidence that any training or consultancy was provided by Arnold, the prosecutor said, and "legitimate staff" working for O'Mara had never heard of him.
"(Ipsa) staff noted that the invoices, particularly those from Confident About Autism, are in different formats, have inconsistent references, and in one case was dated for a date after it was submitted for payment," Mr Bourne-Arton said.
All of the invoices were either rejected or not processed - one of them rejected three times.
Arnold described an "undoubtedly sad state of affairs", Mr Bourne-Arton said.
He told jurors: "O'Mara was plainly unable to cope with the office he held, was in poor mental health and was heavily addicted to cocaine that he was abusing in prodigious quantities."
Financial investigations revealed O'Mara was "living to or beyond his means and in dire need of cash", the court heard.
The prosecutor said: "The reason for that appears to have been that he was funding a significant cocaine habit of which both Gareth Arnold and John Woodliff were plainly aware."
The three defendants were arrested following an investigation and Woodliff, who was a nightclub doorman when O'Mara was a nightclub manager, said "I knew it was dodgy", jurors were told.
The court also heard that O'Mara emailed Ipsa in February 2020, falsely claiming the police investigation had been completed with no action taken, and saying he was entitled to be paid the two invoices relating to services supplied by Arnold.
O'Mara, of Walker Close, Sheffield; Arnold, of School Lane, Dronfield, Derbyshire; and Woodliff, of Hesley Road, Shiregreen, Sheffield, deny all charges.
The trial continues.