U.S. District Judge George Wu said he was tentatively acquitting Lori Drew of misdemeanor counts of accessing computers without authorization.
Drew was convicted in November, but the judge said that if she is to be found guilty of illegally accessing computers, anyone who has ever violated the social networking site's terms of service would be guilty of a misdemeanor. That would be unconstitutional, he said.
"You could prosecute pretty much anyone who violated terms of service," he said. The judge, who had delayed the ruling repeatedly, reminded participants that it is only a tentative ruling until he files it in writing.
Prosecutors had sought the maximum three-year prison sentence and a $300,000 fine, but it had been uncertain going into Thursday's hearing whether Drew would be sentenced.
Wu had given a lengthy review to a defense request for dismissal, delaying sentencing from May to go over testimony from two prosecution witnesses.
Wu said he allowed the case to proceed to trial when Drew was charged with a felony, but she was convicted only of the misdemeanor and that presented constitutional problems.
Drew's attorney Dean Steward said outside court that the U.S. attorney's office in Los Angeles should not have brought the charges in a case that originated in Missouri and was rejected by prosecutors there.
"Shame on the U.S. attorney for bringing this case. The St. Louis prosecutors had it right," Steward said. "The cynic in me says that (U.S. Attorney) Tom O'Brien wanted to make a name for himself or to keep his job."
The U.S. attorney's office did not immediately comment on Wu's decision, which came after an hour of arguments.
Steward said the ruling should mark the end of Drew's criminal case.
"It's not the end of the road, it's the end of the chapter on the criminal side, which is pretty clearly the end," he said.
The parents of Megan Meier, the teenager who killed herself, were in the courtroom but made no immediate comment.
Much attention has been paid to Drew's case, primarily because it was the nation's first cyberbullying trial. The trial was held in Los Angeles because the servers of the social networking site are in the area.
Prosecutors say Drew sought to humiliate Megan by helping create a fictitious teen boy on the social networking site and sending flirtatious messages to the girl in his name. The fake boy then dumped Megan in a message saying the world would be better without her.
She hanged herself a short time later in October 2006 in the St. Louis suburb of Dardenne Prairie, Mo.
Drew was not directly charged with causing Megan's death. Instead, prosecutors indicted her under the federal Computer Fraud and Abuse Act, which in the past has been used in hacking and trademark theft cases.
Wu acknowledged in May he was concerned that sending Drew to prison for violating a Web site's service terms might set a dangerous precedent. Wu at the time noted that millions of people either don't read service terms, as happened in Drew's case.
During the trial, prosecutors argued that Drew violated MySpace service rules by setting up the phony profile for a boy named "Josh Evans" with the help of her then-13-year-old daughter Sarah and business assistant Ashley Grills. They posted a photo of a bare-chested boy with tousled brown hair.
"Josh" then told Megan she was "sexi" and assured her, "i love you so much."
Prosecutors believe Drew and her daughter, who was friends with Megan, created the profile to find out if Megan was spreading rumors about Sarah. Grills testified she received a message from Megan in mid-2006, calling Drew's daughter a lesbian.
Grills, who testified under a promise of immunity, allegedly sent the final, insulting message to Megan before she killed herself. Prosecutors said Megan sent a response saying, "'You are the kind of boy a girl would kill herself over."'
Jurors decided Drew was not guilty of the more serious felonies of intentionally causing emotional harm while accessing computers without authorization. The jury could not reach a unanimous verdict on a felony conspiracy charge.