Under the ruling, people could legally possess less than an ounce of marijuana in their homes.
The state was expected to quickly appeal to the high court.
Superior Court Judge Patricia Collins said a lower court can't reverse the high court's 1975 decision that said the right to privacy in one's home included the possession of small amounts of marijuana for personal use.
Collins granted a summary judgment to the American Civil Liberties Union of Alaska, which sued when the law took effect in June.
She limited her decision to possession of less than 1 ounce of marijuana, even though the new law increases penalties for other amounts. Before the law took effect in June, it had been legal in Alaska to possess up to 4 ounces of the drug.
The state Department of Law argued that new findings of marijuana's increased potency since the 1975 decision justify reconsidering the issue.
ACLU of Alaska executive director Michael Macleod-Ball lauded the decision.
"The notion of privacy in one's home is upheld. That's what we've been saying all along," he said.