Scientists tested the drug psilocybin on 19 depressed patients who could not be helped by conventional treatments.
The patients reported an immediate mood improvement described by some as an “afterglow” effect that lasted up to five weeks.
Brain scans indicated the drug had re-set the activity of key neural circuits known to play a role in depression.
Dr Robin Carhart-Harris, head of psychedelic research at Imperial College London, said: “We have shown for the first time clear changes in brain activity in depressed people treated with psilocybin after failing to respond to conventional treatments.
“Several of our patients described feeling ‘reset’ after the treatment and often used computer analogies. For example, one said he felt like his brain had been ‘defragged’ like a computer hard drive, and another said he felt ‘rebooted’.”
The drug may be giving the patients the “kick start” they need to break out of their depressive states, he said.
Similar brain effects have been seen in patients undergoing electroconvulsive therapy (ECT), a controversial treatment that triggers temporary seizures with electric shocks.
Magic mushrooms containing psilocybin and its derivative psilocin can cause hallucinations, changes in perception and an altered sense of time.
Both chemicals are classified as illegal Class A drugs in the UK, as are the mushrooms themselves. They became popular during the “hippie” craze of the 1960s. The scientists obtained a special licence from the Home Office to conduct the research.
They warned that despite the encouraging results people with depression should not attempt to self-medicate with psychoactive drugs.
They pointed out that the study provided a special therapeutic setting for the “drug experience” to protect participants from potentially harmful effects.
A new trial from the team set to start early next year will test psilocybin against a leading antidepressant in a group of patients.
Professor David Nutt, director of the neuropsychopharmacology unit at Imperial, said: “Larger studies are needed to see if this positive effect can be reproduced in more patients. But these initial findings are exciting.”