Ross Jones, 19, was caught selling the potentially lethal drug to other festival-goers and was found to have 28 tablets worth nearly £300.
Perth Sheriff Court was told that Jones had also been booted out of the Scouts and fired from his job in a Glasgow department store.
The teenager has been told he can no longer take part in any Scouting activities because of his involvement in drug trafficking.
The university dropout was seen circling the Slam Tent at the music festival selling the Class A drug to several people. Jones, from Glasgow, admitted being concerned in the supply of Ecstasy on 13 July.
Sheriff Lindsay Foulis, sentencing him to four months' detention, said: "You were party to a decision to sell a Class A drug."