Evan Harris, former MP of Great Britain, said the show, criticised by some experts, was a "valuable opportunity" to discuss issues surrounding the drug and that he wanted to help finding a dose that might help treating depression without giving patients a high.
Dr Harris, is among a group of public figures who have taken MDMA, the pure form of ecstasy, or a placebo for a programme entitled Drugs Live : The Ecstasy Trial.
The programme, to be broadcasted later this month, is part of a wider study into ecstasy and its effects on the brain led by Professor David Nutt, the government's former chief drugs adviser.
After being given the drug, Dr Harris and the other volunteers were placed inside a brain scanner and their neurological activity was monitored.
"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.
In a separate statement, Dr Harris said he had long been an admirer of the work of Prof Nutt, who was sacked in 2009 after clashing with the then Labour home secretary Alan Johnson over drugs policy.
Prof Nutt was removed after saying cannabis was less harmful than alcohol or nicotine.