The Fifth Doctor and Peri arrive on Androzani Minor, the source of a life-prolonging drug called spectrox. Production of the drug is controlled by Sharaz Jek, a facially deformed madman in self imposed exile, who blames Morgus, a powerful industrialist on Androzani Major, for all his misfortunes. Jek is fighting Morgusí troops on a daily basis using his android army.
Jekís android weapons are supplied by gun-runners employed by Morgus, who then receives payment in refined spectrox. But, Jek becomes infatuated with Peri and saves her and the Doctor from execution by Morgusí troops only to hold them prisoner himself. They escape Jek but contract spectrox toxaemia, a fatal condition with only one antidote - milk from a giant queen bat.
In a climactic battle, Morgus, Jek and all the soldiers are killed. The Doctor now dying, carries Peri back to the TARDIS, where he gives her the antidote. She recovers, but the Doctor has to regenerate to save his own life.