Buma/Stemra, an organisation that represents composers, songwriters and music publishers in the Netherlands, brought the case to the Amsterdam district court.
Judge R Orobio de Castro found that because KaZaA BV does not have a licence from Buma/Stemra, it is acting unlawfully by making software available that allows users to download music files.
KaZaA has 14 days to comply with the order. If not, the company will have to pay 100,000 guilders (£28,300) a day, up to a maximum of two million guilders.
KaZaA's attorney Christiaan Alberdingk Thijm said: "Our software can't disappear, it is already out there, and the minute we take down our Web site, mirrors will appear."
KaZaA's peer-to-peer (P2P) software allows users to search and download files off each other's hard drives. The company does not require a central server to work, unlike Napster, which was shut down when it installed filters on its servers after a legal battle in the US.
Alberdingk Thijm voiced his concerns over the verdict. "Now we don't know what to do. Should we go door-to-door and ask people to stop using the software? Should we put a notice on our Web site? Whatever we do, it will always lead to a new conflict with Buma/Stemra," he said.
KaZaA is weighing up its options and might appeal, Alberdingk Thijm added.
A spokesman for Buma/Stemra declined to comment on the case, saying that the company has not studied the verdict.
However, users will not be affected by the verdict, said Lee Black, research director at analyst firm Webnoize. He called the ruling the fruit of "a judicial system that doesn't understand the technology it is trying to regulate".
"You could take down the KaZaA Web site and prevent anybody from downloading the application from there, but you can't prevent users from launching the client and accessing the network," he added.
KaZaA is based on P2P technology developed by Amsterdam-based FastTrack, and the way to kill KaZaA, said Black, is for copyright holders to go after FastTrack.
In the US, the Recording Industry Association of America and the Motion Picture Association of America have filed lawsuits against KaZaA, Morpheus and Grokster.