Evan Harris, who lost his Oxford West and Abingdon seat in the 2010 general election, takes part in the controversial programme Drugs Live: The Ecstasy Trial, to be broadcast next Wednesday, that sees participants given MDMA or a placebo before being placed inside a brain scanner.
He said that he wanted to help find a dose that might treat depression without getting the patient "high."
Mr Harris said: "In order to be allowed to take part in the trial, I needed to have taken ecstasy at least once before without any ill-effects.
"Without going over my 'ecstasy history', I qualified," he added.
"It was not obvious to me when I was taking the MDMA and when I was taking the placebo. But it was clear I wasn't raaving. I wasn't entering into this hoping to get a free high. I was just keen to help the study."
The study is being led by Professor David Nutt, Britain's former chief drugs adviser who was sacked after criticising government policies.