The comedian was sued by actress Katherine McKee for defamation, seeking monetary and punitive damages.
A federal judge in Massachusetts has dismissed the lawsuit against Bill Cosby by Katherine McKee.
Mckee, an actress, claimed the veteran TV host raped her in 1974, according to court documents.
McKee's sexual assault allegation first appeared in a New York Daily news article in 2014.
After the article was published, Cosby wrote a letter to the paper denying the claim. His lawyer then asked the paper to retract the article, according to spokesman Andrew Wyatt.
McKee went on to sue the comedian for defamation, seeking monetary and punitive damages.
McKee filed the lawsuit at the end of 2015, a year after the article's publication.
A U.S. District Court Judge, Mark Mastroianni, then ruled that McKee had not proven that Cosby had defamed her simply by denying her claims.
"An accused person cannot be foreclosed, during their responsive navigation, from considering the issuance of a simple and unequivocal denial -- free from overall defamatory triggers or contextual themes," he wrote in the decision.
"Such a situation would be inconsistent with basic First Amendment principles."
Cosby's spokesman, Wyatt told CNN in a statement that, "this is another in a line of recent developments vindicating Mr Cosby's right to defend himself in the face of an onslaught of unverified accusations."
Meanwhile, McKee is not pleased with the latest development. She told CNN on Thursday, February 16, 2017, she is "very disgusted" with the court's ruling and had no further comment.
Cosby has been accused of sexual misconduct by more than 50 women.
Andrea Constand, an employee at his alma mater, Temple University, was the first woman to publicly accuse Cosby of sexual misconduct, in 2004.