Officers in Kirkcaldy, Fife, say the blue pill was not the same kind linked to the death of Clydebank schoolgirl Regane MacColl but underlined that all illegal drugs can have a potentially harmful effect.
The man is recovering in Victoria Hospital after taking ecstasy outside a night spot in the early hours of this morning.
Kirkcaldy community inspector Dave Latto said: "This young man was extremely lucky in that he was accompanied when he collapsed and medical attention was quickly on the scene, otherwise we could be looking at a tragic scenario where another young life was needlessly wasted and a set of parents had lost their son.
"Whilst we are looking at positive lines of inquiry in relation to how he came to be in possession of this tablet, I would urge anyone with information about any person supplying such drugs to contact Police Scotland on 101 or Crimestoppers on 0800 555 111."
Mark Steven from Fife Alcohol and Drug Partnership said: "There is no way to accurately predict the effects of illegal drugs on individuals but there is always a risk of serious or life-threatening harm particularly if taken with other substances, including alcohol.
"If you suspect someone may be having a bad reaction or overdose due to substances they have taken the simple advice is to seek emergency help by calling 999 and asking for an ambulance."
Ms MacColl died after taking a ''mortal kombat'' tablet at Glasgow nightspot The Arches on Saturday February 1.
Police in the west of Scotland have since made three ecstasy seizures and arrested seven people but say they are not currently being linked to the 17-year-old's death.