The ruling came in a case brought by eight Hollywood movie studios that sued to stop a Web site from providing or linking visitors to software that descrambles the code meant to prevent DVDs from being copied.
U.S. District Judge Lewis A. Kaplan ruled that the posting of the code violates federal copyright law.
The ruling was a loss for Eric Corley, who had already been forced by a preliminary injunction to remove the DeCSS code from his 2600.com Web site.
The software, developed by hackers, helps computer users copy full-length movies from digital versatile discs onto their hard drives or other media.
Kaplan rejected a defense argument made during the trial last month that computer code is a form of expression protected by the First Amendment.
"Computer code is not purely expressive any more than the assassination of a political figure is purely a political statement," Kaplan said.
Leon Gold, a lawyer for the Motion Picture Association of America, said the organization was delighted with the ruling.
"It establishes once again that you cannot take anyone's copyrighted work without permission," he said. "The Internet hasn't withered the strong arm of equity."
Jack Valenti, president and of the MPAA, called Kaplan's decision the "stoutest defense of the sanctity of copyright that I've ever read."
Martin Garbus, a lawyer for Corley, said: "We understood that this was an issue that has to be resolved by the Supreme Court. The judge's First Amendment analysis is wrong."
By Larry Neumeister