The law was passed in March 2001 after the death of race car driver Dale Earnhardt, who was killed in a crash in the final lap of last year's Daytona 500.
"The right to privacy, the right to freedom of press and speech, the right of the people to have access to public records and the right to be left alone are important rights to all who live in this county," Circuit Judge Leroy Moe wrote in his order.
"They are not absolute rights, however, and they frequently clash, as they did in this case. The legislature has indeed applied a proper balancing of these rights in enacting this legislation."
State lawmakers passed the law at the urging of Earnhardt's widow, Teresa. The law has been challenged by newspapers, television stations and Web sites.
The law makes it a felony punishable by up to five years in prison and a $5,000 fine for unauthorized persons to view or copy autopsy photos without a court order.
It was upheld by Volusia County Circuit Judge Joseph Will last year. That case was appealed to the Fifth District Court of Appeal in Daytona Beach.
In March, Moe had expressed concerns about the law, saying that the state's broad open records law may be more important than protecting families from the pain caused by having graphic autopsy photos made public.
At that time, he questioned the validity of placing the privacy rights of family members over the public's right to access public records.
Attorneys for the Orlando Sentinel and the South Florida Sun-Sentinel argued that the law was unconstitutional and should be struck down, partly because it was too broad.
After Earnhardt's crash on Feb. 18, 2001, the Sentinel sought a review of his autopsy photos by a safety expert to determine whether better equipment could have prevented the driver's death.
That request prompted the Legislature to act quickly to bar access to the photos and led to the ensuing legal battles.
The law also was being challenged by The Tampa Tribune, its television affiliate, WFLA-TV, and four newspapers owned by the New York Times Co. --The Gainesville Sun, The Ledger in Lakeland, the Sarasota Herald-Tribune and Ocala Star-Banner.