In addition to jail, Los Angeles Superior Court Judge Stephanie Sautner ordered Lohan to serve more than 400 hours of community service, which would include 300 hours at a women's center.
"Perhaps then she might see how truly needy women who have fallen on truly hard times have to live," said Sautner.
Lohan's attorney, Shawn Holley, filed a notice of appeal before court closed, which allowed for the actress' release at 9:21 p.m. Lohan previously has been jailed three times.
Lohan's Charges Reduced to Misdemeanor
Earlier on Friday, Sautner reduced Lohan's grand theft case regarding the necklace she allegedly stole on Jan. 22 to a misdemeanor. Lohan pleaded not guilty to that misdemeanor charge.
Sautner set a trial date on the misdemeanor charge for June 3 and a pretrail date for May 11.
The misdemeanor has a potential penalty of a year in jail, whereas the original felony charge had a potential penalty of three years in jail.
In making her ruling to reduce the charges, Sautner said, "I'm going to give her an opportunity."
The decision came after Deputy District Attorney Danette Meyers concluded her case against Lohan after calling four witnesses, including the owner of Kamofie and Co., the store from which Lohan allegedly stole the necklace, an employee of the store, and two police officers who handled Lohan's case.
Holley had asked Sautner to dismiss the charge altogether, saying "This is not a stealth, crafty crime."
As Holley spoke, Lohan started tearing up, and a bailiff gave her tissues.
During the hearing, Kamofie and Co. owner Sofia Kaman revealed that the necklace Lohan is accused of stealing cost far less than its $2,500 price tag. She said she paid $850 for the necklace.
Asked by prosecutor Danette Meyers why the necklace was marked up to $2,500, Kaman said it's common to mark up jewelry two to three times what the manufacturer charges.
Things got contentious when Lohan's lawyer, Holley, questioned Kaman and the issue of Lohan's cleavage came up several times. Holley tried to establish if Kaman was paying attention to Lohan's chest while Lohan was in the store and if Kaman should have noticed Lohan walking out with the necklace.
At one point, the tone of the questioning prompted Sautner to tell Holley and Kaman to be more respectful.
Before Kaman, Tinelli Comsookri, a salesperson at Kamofie and Co, said that Lohan tried on a pair of $1,180 earrings four days prior to the necklace incident and tried to walk out of the store wearing one of the earrings. Comsookri said that when he stopped Lohan, she apologized and gave back the piece of jewelry.
Comsookri emailed Kaman afterwards to tell her what happened.
Holley asked if Kaman was more observant of Lohan than she normally would be because of the earring incident.
Lindsay Lohan Wears Tight Top, Loose Pants to Court
Lohan arrived for the 10 a.m. PT hearing at Los Angeles Superior Court with a tight black top, wide-legged blue pants, a cream scarf and her hair pulled up. Lohan's estranged father, Michael Lohan, arrived before her, shortly after 9 a.m. PT.
The 24-year-old actress, who turned down an earlier plea deal regarding the necklace case, had sought to get the Good Friday hearing pushed back, citing religious beliefs. The judge apparently was not persuaded by Lohan's attempt to put off the hearing.
Lohan has denied any wrongdoing. She has maintained that the store let her borrow the necklace and her assistant returned it to police. She was arraigned in February on one felony grand theft charge.
Lohan has been to jail three times in the past three years for DUI, drug possession and probation violations.
Amid her legal troubles, the actress is trying to rebuild her career. This week, she secured a role in "Gotti: Three Generations," an upcoming movie about mob boss John Gotti that will star John Travolta. She posed alongside the film's cast and the Gotti family at a press conference in New York last week.
The "Mean Girls" star acknowledged last month that rebuilding her reputation in Hollywood won't be easy.
"I miss being on set," she said in an interview with the entertainment news show "Extra." "I know there is going to be a lot of steps I'll have to go through to prove myself again and get the trust from people I respect to work with."
The Associated Press contributed to this report.