The actress, 24, was released from rehab Aug. 24 after serving almost two weeks in jail for violating probation in a DUI case.
The drug test occurred "in recent days," adds the source.
The new judge in her case, Elden Fox, previously warned Lohan that a dirty test would be met with a month jail sentence. Lohan is currently undergoing intense outpatient treatment and is subject to random drug testing twice a week pending her next hearing date of Nov 1.
L.A. District Attorney spokeswoman Jane Robison had no comment about the failed test. Lohan's lawyer Shawn Chapman Holley wasn't immediately available for comment.
TMZ.com was the first to report the failed drug test.