Donald J. Trump was minutes away from being grilled under oath by the New York attorney general and he was itching to talk. To fend off the state’s fraud investigation, the former president insisted on answering every question, believing he alone knew what to say.

But his lawyer at the time, Ronald P. Fischetti, directed Mr. Trump to keep quiet.

He instructed the former president to invoke his Fifth Amendment right against self-incrimination during the 2022 deposition with the attorney general, Letitia James, according to two people with knowledge of the discussion. Mr. Fischetti warned Mr. Trump that he was risking perjury charges, and that he would come to regret it.

Mr. Trump relented, but his legal problems were only just beginning. Over the past year, he was indicted four times and faced three civil trials. And as the former president’s first criminal trial approaches on March 25, it has become clear — as it was to Mr. Fischetti — that the single person who poses the greatest danger to Donald J. Trump may just be Donald J. Trump.

In two of the recent civil trials, the former president directed his lawyers to object at inopportune moments, ranted about the judges and even stormed out of the courtroom. He lost both trials and was ordered to pay more than half a billion dollars combined.

Now, a new team of lawyers is preparing to defend him in Manhattan, where prosecutors have accused Mr. Trump of covering up a potential sex scandal that could have swayed the outcome of the 2016 election. It is not only Mr. Trump’s first criminal trial, but the first time any former American president has faced prosecution. And how the legal team corrals Mr. Trump — or fails to — could determine whether he is also the first former president to be convicted.

“I would expect Trump to try to act up,” said Ty Cobb, a veteran lawyer who worked in the White House Counsel’s Office during the Trump administration and who has since been critical of the former president. He added: “He needs to be aggressively muzzled by the lawyers if he is to avoid offending the jury.”