Superior Court Judge Marsha Revel recused herself Friday, court spokesman Allan Parachini and district attorney's office spokeswoman Jane Robison said.
Beverly Hills Superior Court Judge Elden Fox is now handling the Lohan case.
Revel's clerk said there would be no comment, and she referred callers to Parachini.
Deputy District Attorney Danette Meyers was in court and unavailable for comment.
Robison said there were several instances when the judge had communications and the prosecutor was not present or told afterward.
In one instance, the judge contacted the Morningside Recovery rehab facility, which was not on a list provided by her court-appointed experts. She then selected Morningside as a place to send Lohan.
Lohan attorney Shawn Chapman Holley eventually persuaded the judge to send Lohan to Ronald Reagan UCLA Medical Center.
An e-mail request to Chapman seeking comment wasn't immediately returned. Court officials declined further comment.
The actress was released Aug. 2 from the women's jail in Lynwood, where she served 14 days of a 90-day sentence for violating her probation in a 2007 drug case.
She immediately went to the UCLA drug rehabilitation facility for a court-ordered three-month stint.