Comello allegedly believed in the unfounded QAnon conspiracy theory, which claims Mr Trump will take down a corrupt cabal of high-ranking politicians, Hollywood actors and members of the media who are controlling America.
His lawyer, Robert C Gottlieb, has argued his client went to Cali’s home to arrest him and turn him over to the military but ended up shooting the crime boss when he resisted.
“He ardently believed that Francesco Cali, a boss in the Gambino crime family, was a prominent member of the deep state, and, accordingly, an appropriate target for a citizen’s arrest,” Mr Gottlieb wrote in a court document.
In the conspiracy theory, “Q” is an anonymous figure who shares cryptic posts on the fringe message boards 4chan and 8chan, offering clues to supposed developments and making allegations about specific people.
The allegations have created a elaborate but entirely unfounded theory which claims, among other things, that a variety of public figures are running a paedophile ring and Robert Mueller was secretly investigating Hillary Clinton and Barack Obama instead of Mr Trump.
Despite the fact that Q’s predictions have not come true, the conspiracy theory has grown in popularity since it began in 2017 and supporters are sometimes seen at Trump rallies.
Mr Trump has also helped to promote the theory by retweeting a conspiracy theorist in September and taking a photo with Michael William Lebron, an enthusiastic supporter of QAnon, at the White House in August 2018.
Last month, NBC News identified four Republican candidates running in primaries for Congress who have shared or promoted messages affiliated with QAnon.
Brendan Steinhauser, a Republican strategist in Texas, told NBC that the conspiracy has started to creep into his work.
“I'll get emails about it. People come on their Facebook page, and activists will say, 'What's your stance on this?’ Or, ‘You heard about this, right?’” Mr Steinhauser said.
“I think if they see candidates out there who are sounding crazy, that's going to hurt the Republican brand.”
Mr Gottlieb has suggested Comello’s belief in QAnon makes him unfit to stand trial and argued his client should be given psychiatric treatment.
Prosecutors have argued Comello can be held responsible for his actions and insisted his mind was “crystal clear” when he waived his right to a lawyer during an interview with detectives.
Comello appears to think he is mentally sound and has refused a psychiatric exam.
When the judge, William E Garnett, told him this could jeopardise the insanity defence, he said he was “perfectly fine with that”.
Defendants in New York, where the trial is based, must prove that their mental illness prevented them from understanding the consequences of their actions if they want to use an insanity defence.