The actress immediately burst into tears after the ruling.
Superior Court Judge Marsha Revel issued the sentence after listening to testimony from employees of a court-mandated alcohol treatment program.
Lohan missed numerous classes - seven since last December - which led to the judge's harsh rebuke of Lohan moments after the "Mean Girls" star offered a tearful apology.
"I did do everything I was told to do and did the best I could to balance jobs and showing up," Lohan told the judge. "It wasn't vacation, it wasn't some sort of a joke."
Revel said she found Lohan's apology insincere, comparing it to "somebody who cheats and thinks it isn't cheating if she doesn't get caught."
Lohan was not immediately taken into custody and will be permitted to surrender on July 20. She will have to wear an ankle alcohol monitor until then.
Los Angeles County district attorney spokeswoman Jane Robison said it was not uncommon for judges to allow defendants to turn themselves in at a later date so they can get their affairs in order.
The sentence tripled the monthlong jail sentence prosecutors had sought for Lohan.
The actress' father and younger sister also burst into tears after the sentence was issued.
Revel revoked Lohan's probation and ordered her to wear an ankle alcohol monitor after the starlet missed a court date in May. She was promoting a film project at the Cannes Film Festival at the time and claimed her passport was stolen.
The monitor issued an alert after the actress attended the MTV Movie Awards and after-parties last month. Revel said the device registered a .03 blood alcohol level at the time.
Lohan's attorney, Shawn Chapman Holley, urged the judge to place the actress back on probation, saying she had learned her lesson and had improved.
Prosecutor Danette Meyers disagreed and urged jail time for the star.
"When you ordered her to go every week, it didn't catch her attention," Meyers said in a closing statement.
Lohan spent 84 minutes in jail in 2007 after she pleaded guilty to two misdemeanor counts of being under the influence of cocaine and no contest to two counts of driving with a blood-alcohol level above 0.08% and one count of reckless driving.
The plea came after a pair of high-profile arrests earlier that year. Lohan was sentenced to three years of probation but had to ask for a yearlong extension in October after she failed to complete her alcohol-education courses on time.
Earlier AP story
A judge at Lindsay Lohan's probation revocation hearing said Tuesday she would not consider whether the actress consumed alcohol last month after attending the MTV Movie Awards.
Prosecutors had hoped to introduce reports from an ankle, alcohol monitor to show the "Mean Girls" actress had violated a court order against drinking imposed as part of a 2007 drug case.
Superior Court Judge Marsha Revel said the device showed Lohan's blood-alcohol content was 0.03. Lohan has denied drinking that night.
The judge added, however, that she would honour what she told lawyers for both sides in a closed hearing, and not allow the negative report to be used at the hearing that could end with Lohan being sent to jail for a possible violation.
Revel said she would only consider whether the actress failed to complete the required number of alcohol education courses on time.
Cheryl Marshall, a co-founder of the education program, testified she did not report Lohan to be in violation of the judge's order when the actress missed nine meetings then made up an undisclosed number.
Marshall recalled receiving a phone call from the judge in December saying she wanted Lohan to attend classes each week. But Marshall added she never got a paper copy of the order and did not consider it active.
Marshall's program fought against providing records and testimony at the hearing, but Revel ruled the information was necessary.
Lohan's attorney Shawn Chapman Holley said she hadn't prepared to defend against the alcohol monitor report because the judge had said it would only affect bail for the actress. Revel doubled Lohan's bail to $200,000 after learning of the alert last month.
Lohan arrived about 10 minutes early for the hearing at the Beverly Hills courthouse. Lohan's father Michael and younger sister also attended.
Revel scheduled the hearing after Lohan missed a court date in May. She has been required to wear an ankle alcohol monitor since then.
The hearing immediately hit a snag as Chapman Holley and prosecutor Danette Meyers sparred on what evidence could be introduced.
Lohan spent 84 minutes in jail in 2007 after she pleaded guilty to two misdemeanor counts of being under the influence of cocaine and no contest to two counts of driving with a blood-alcohol level above 0.08 percent and one count of reckless driving.
The plea came after a pair of high-profile arrests earlier that year. Lohan was sentenced to three years of probation but had to ask for a yearlong extension in October after she failed to complete her alcohol-education courses on time.
Revel revoked Lohan's probation in May after the actress missed the court date to promote a film project at the Cannes Film Festival. Lohan claimed her passport was stolen.
Weeks later, the alcohol monitor issued an alert after Lohan attended the MTV Movie Awards and after-parties.
Regardless of the outcome, the hearing won't be the last reminder for Lohan of the court case and her arrests. She will soon be questioned about her drug use three years ago by civil attorneys representing a woman suing Lohan.
The actress' attorney persuaded a judge to delay that deposition until after the hearing so her answers couldn't be used against her in the criminal case.