Superior Court Judge Thomas Rubinson dismissed counts filed under the law against Paul Raef, who was charged in July with being involved in a high-speed pursuit of Justin Bieber.
The 2010 law raised the penalty for those who drive dangerously in pursuit of photos for commercial gain.
The offense is punishable by six months in jail and a $2,500 fine but went unused until Raef was involved in the freeway chase of Bieber that topped 80 mph and prompted several 911 calls.
Raef still faces traditional reckless driving counts and has not yet entered a plea.
The judge cited numerous problems with the paparazzi statute, saying it was aimed at newsgathering activities protected by the First Amendment, and lawmakers should have simply increased the penalties for reckless driving rather than targeting celebrity photographers.
He also said the law could be used against photographers rushing to shoot a wedding or political rally, or even a private citizen such as himself on the way to an event that might generate photos worth selling.
Assistant City Attorney Ann Rosenthal said hours after the ruling that her office would appeal. The judge put the case on hold until the appeal is resolved.
Rubinson's ruling only affects Raef's case, but the law could be struck down completely by the appellate court, said Brad Kaiserman, an attorney for Raef.
Kaiserman argued the statute was unconstitutional and meant to protect celebrities, not the public.
"This discrimination sets a dangerous precedent," he said.
Prosecutors countered that the law could be applied to people in other professions, not just the media.
"The focus is not the photo. The focus is on the driving," Rosenthal argued.
While the media is granted freedom under the First Amendment, its latitude to gather news is not unlimited, she said.
"This activity has been found to be particularly dangerous," she said of chases involving paparazzi.
Prosecutors should focus on using existing laws, including reckless driving and false imprisonment statutes, to tackle aggressive behavior by celebrity photographers, said Doug Mirell, a First Amendment attorney.
"I think that celebrities who are being stalked or chased by paparazzi are entitled to be concerned about their personal safety and the safety of their families when these events occur," Mirell said. "But I think that there's a legitimate question about whether the Legislature took the right path in trying to accommodate those concerns."
He said the judge's concerns about having other members of the public caught up in the case is valid, and any law that specifically targets newsgathering efforts will prove more difficult to win than a case filed using traditional laws.
The law used to charge Raef was influenced by the experiences of Jennifer Aniston, who provided details to a lawmaker on being unable to drive away after she was surrounded by paparazzi on Pacific Coast Highway.