Cosby is fighting efforts by The Associated Press to unseal motions from a lawsuit he settled with a former Temple University employee.
The lawsuit accused Cosby of drugging and sexually assaulting the woman at Cosby's home. The settlement is confidential.
Cosby's lawyer argued that his client's deposition could reveal details of Cosby's marriage, sex life and prescription drug use.
"It would be terribly embarrassing for this material to come out," lawyer George M. Gowen III argued.
He said the public should not have access to what Cosby was forced to say as he answered questions under oath from the accuser's lawyer nearly a decade ago.
"Frankly, ... it would embarrass him, (and) it would also prejudice him in eyes of the jury pool in Massachusetts," Gowen said.
More than a dozen women have since accused Cosby of sexually assaulting them, and three have a defamation lawsuit pending against him in Massachusetts.
They allege that he defamed them when his agents said their accusations were untrue. Cosby is trying to get their case thrown out before discovery. He has never been charged with any related crimes.
U.S. District Judge Eduardo Robreno asked Friday why Cosby would be embarrassed by the release of his sworn testimony, given that the accusations in the Temple woman's lawsuit are already in the public eye.
"Why would he be embarrassed by his own version of the facts?" Robreno asked.