Lawyers for the two men sought to undermine Mr. Hernandez’s testimony by calling him a liar who hoped to avoid a long prison term for himself.

“You don’t think he would do whatever he needs to do to go home?” Deveraux L. Cannick, Mr. Ellison’s lawyer, told jurors during closing arguments. “There’s a motive to lie here.”

Mr. Hernandez’s lawyer, Dawn M. Florio, declined to comment on Wednesday.

In the prosecution’s new court filing, the office of Geoffrey S. Berman, the United States attorney for the Southern District of New York, said that Mr. Hernandez had been truthful from the beginning of his cooperation, and that his information was corroborated by other evidence developed independently by the government.

Federal law enforcement authorities first approached Mr. Hernandez on Nov. 17, 2018, prosecutors said in the memo. In a meeting with prosecutors and his lawyer, he was warned of threats against him that had been intercepted on a wiretap of a cellphone belonging to a high-ranking member of the Nine Trey crew, the memo said.

Mr. Hernandez, who grew up in the Bushwick section of Brooklyn, ultimately declined a government offer of protection, but he provided some information about Nine Trey, the prosecutors wrote.

Mr. Hernandez was arrested the next day, and the following morning, he again met with prosecutors, admitting to his involvement in the gang and to his role in an armed robbery for which he had been charged, the memo said.

Mr. Hernandez provided the government with information over the course of seven sessions with prosecutors through Jan. 23, when he pleaded guilty to racketeering conspiracy and other charges, the government said. The guilty plea was initially kept secret while the investigation continued.