WASHINGTON — The special counsel’s office sought to keep secret the memos written by the former F.B.I. director James B. Comey, in an attempt to stop those under investigation — like President Trump — from tailoring their stories to line up with Mr. Comey’s accounts, according to a court transcript made public Tuesday.

Lawyers for the special counsel, Robert S. Mueller III, made their arguments in a closed-door hearing in January 2018 before a federal judge, who was overseeing a lawsuit to have memos Mr. Comey wrote about his interactions with the president released to the public. News organizations had sued the Justice Department over access to the memos, but the case became moot when Congress made them public three months later. The judge ordered a transcript of the hearing released on Tuesday.

The transcript provides a window into the status of the special counsel’s investigation eight months after Mr. Mueller began examining whether Mr. Trump obstructed justice, among other issues. At the hearing, one of Mr. Mueller’s top lawyers, Michael Dreeben, tried to illustrate the severity of the investigation, the questions over the president’s conduct and the potential benefits for witnesses who had read Mr. Comey’s memos.

“An individual who is seeking to shape or mold his own statements around those of others thereby acquires an advantage in doing so that he would not otherwise have,” Mr. Dreeben said, according to the transcript.