Judge William Carey's ruling is virtually certain to be appealed to the state Supreme Court, and he said his decision wouldn't take effect until Tuesday to give Miller time to do so.
A Miller spokesman said a statement was forthcoming.
The ruling marks a victory for Murkowski in her historic write-in Senate bid. Senators are scheduled to be sworn in Jan. 5, and the legal dispute has thrown into doubt whether someone from Alaska will be included.
Miller's attorney had asked Carey to strictly enforce a state law calling for write-in ballots to have the oval filled in, and either the candidate's last name or the name as it appears on the declaration of candidacy written in.
Miller complained that the state shouldn't have used discretion in determining voter intent when tallying ballots for Murkowski. The state relied on case law in doing so and allowed for ballots with misspellings to be counted toward Murkowski's total.
"If the legislature intended that the candidate's name be spelled perfectly in order to count," Carey wrote in his much anticipated ruling, "then the statute would have included such a restrictive requirement."
Unofficial results showed Murkowski ahead by 10,328 votes and still in the lead by 2,169 votes even when excluding votes challenged by Miller's campaign. Carey said whatever interpretation he made would not change the outcome of the race, that "Murkowski has won by over 2,000 unchallenged votes."
Murkowski ran an unprecedented write-in campaign after losing the GOP primary to Miller, and she emerged with a wide lead after a tedious count of every write-in ballot.
Miller last month said he'd stop fighting if the ballot math didn't work in his favor. But he has since insisted that his fight was a matter of principle to ensure the law is upheld and Alaskans got a fair election.
Murkowski's campaign accused Miller of seeking to disenfranchise thousands of Alaska voters.
Some of the challenges by Miller observers included ballots in which voters spelled her name correctly but wrote "Murkowski, Lisa," on the line. Miller later conceded those should not have been challenged.
Arguments in court this week centered on what the word "appears" means. Miller attorney Michael Morley contended it wasn't the order of the words but the spelling that mattered. The spelling is what makes a name a name, he said. Carey said in his ruling that Miller's interpretation of the law was "inconsistent."
There were also more than 2,000 ballots that were not counted toward Murkowski's tally and challenged by her observers. Those included ballots in which the ovals weren't filled in but Murkowski's name was written in.
State officials and Murkowski's campaign have sought a speedy resolution, saying Alaska would be deprived of representation if a winner isn't sworn in with the new Congress next month.
On Friday, state officials told a federal judge it would seek to have the stay he imposed on certification of the race lifted if Miller lost and did not file a speedy appeal to the state Supreme Court. U.S. District Judge Ralph Beistline last month kicked the case to state court and issued the stay to allow for the issues raised by Miller to be resolved.
The governor of Alaska said this week that he is exploring his legal options to ensure Alaska's interests are fully represented in the Senate, including the possibility of appointing an interim senator, in the event of a prolonged legal fight.
By Associated Press Writer Becky Bohrer