Police executed the search and seizure warrants during a January raid on Dotcom's home near Auckland.
Dotcom is the founder of Hong Kong-based file-sharing site Megaupload. He's accused by U.S. prosecutors of facilitating Internet piracy on a massive scale. Charged with racketeering and money laundering, he's fighting U.S. attempts to extradite him.
Justice Helen Winklemann ruled Thursday the warrants were overly broad and that New Zealand authorities also acted unlawfully by handing digital copies to the FBI.
Winkelmann has not yet decided upon any remedies. What impact her ruling, which is likely to be appealed, will have on the complex case will likely become clearer in coming weeks.