WELLINGTON—Kim Dotcom, the founder of website Megaupload.com, is to remain free on bail as he awaits a decision on whether he will be extradited to the U.S. to face charges of alleged copyright infringement after he won an appeal at the New Zealand High Court.

Mr. Dotcom was granted bail a week ago but the decision was challenged through appeal by the New Zealand government on behalf of the U.S. Federal Bureau of Investigation.

Justice Tim Brewer dismissed the appeal at the High Court at Auckland, a Minister of Justice spokeswoman said.

Mr. Dotcom, 38 years old, was named in an FBI indictment in January as the founder and, until last year, chief executive of Megaupload. He was arrested alongside Megaupload Chief Marketing Officer Finn Batato, 38, Chief Technical Officer, Director and co-founder Mathias Ortmann, 40, both from Germany, and Dutch national Bram van der Kolk, 29.

Mr. Dotcom's three colleagues have also been granted bail.