Mr. Comey wrote memos after meeting with Mr. Trump in the first days and weeks of his presidency, saying later that he wanted to document the encounters because he worried that the president would lie about their discussions. Mr. Trump and his allies accused Mr. Comey of illegally leaking the memos as they tried to undermine his standing as a key witness in the investigation by the special counsel, Robert S. Mueller III.

The inspector general laid out a litany of problems with Mr. Comey’s actions. In addition to concluding that the memos were F.B.I. property, not his, the report noted that Mr. Comey failed to return them to the F.B.I. after he was fired and improperly disclosed bureau documents and information to his friend and personal lawyer, Daniel C. Richman, and his other lawyers.

At issue in part is who owns the information in the memos: Mr. Comey or the F.B.I. While Mr. Comey said he believed that two of his memos were his personal documents, all of the senior leaders interviewed by the inspector general disagreed, believing they were the property of the F.B.I.

The inspector general acknowledged that Mr. Comey did not leak any classified information to the news media. But Mr. Richman, not Mr. Comey, told the F.B.I. that the other lawyers, David Kelley and Patrick Fitzgerald, also possessed memos; Mr. Comey never told the F.B.I. that he had shared four memos with his lawyers, according to the report.

Mr. Comey has said he would not do anything differently if faced with the same set of choices. Rod J. Rosenstein, the former deputy attorney general, has said that Mr. Comey’s intransigence was partly why he backed firing him in 2017.

Mr. Comey kept four memos inside a safe at his home and shared details about one with Mr. Richman, who told a Times reporter about its contents. Mr. Comey later sent some of the memos to Mr. Richman and his other lawyers, and the F.B.I. eventually deleted the memos from their computer systems.

The contents of the document that Mr. Richman shared detailed a private dinner Mr. Comey had with the president — itself an unusual encounter — at which Mr. Trump demanded Mr. Comey’s loyalty. That memo contained no classified information, officials later determined.