New Zealand's High Court ruled the warrants did not adequately describe the offenses alleged.
"Indeed they fell well short of that," Judge Helen Winkelmann ruled. "They were general warrants, and as such, are invalid."
DotCom, 38, was arrested in January in Auckland after the United States issued an indictment on criminal copyright violations and racketeering, alleging the MegaUpload site encouraged users to store and share pirated videos, music, software and other media, costing Hollywood studios and other copyright owners $500 million.
DotCom has argued the site was legitimate and protected by the Digital Millennium Copyright Act.
In her ruling, Winkelmann also said it was unlawful for the data confiscated in the raid to have left New Zealand, saying, "The release of the cloned hard drives to the FBI for shipping to the United States was contrary to the 16 February direction" given by the court "that the items seized were to remain in the custody and control of the commissioner of police."
Lawyers for MegaUpload are expected to appear in a Virginia federal court Friday to argue the charges should be tossed out, CNET.com reported.
Millions of Getty images now available for free via embed tool
NBC reportedly holds celebs hostage to Jimmy Fallon's show