The inhabitants of Pluto in the far future are taxed to desperation, not least the functionary Cordo, who is so overwhelmed by the size of his tax bill that he decides to take his own life by jumping from the roof of one of the vast Megropolis tower blocks. He is interrupted in this pursuit by the arrival of the Doctor and Leela from the TARDIS, who save him from his chosen fate, and discover that false suns have been created around Pluto to provide the ability for some of mankind to live. However, the Company which owns the suns and all the buildings on Pluto is using its economic stranglehold over mankind to extort ever growing taxes through an extreme form of usury. The Doctor is concerned at this economic and social structure, where each Megropolis is ruled by a taxation Gatherer, and the entire operation on the planet reports to a malevolent Collector. Some citizens have rejected this social order and choose to live in the dark tunnels of the Undercity. The Doctor, Leela and Cordo venture there and encounter the renegades of the undercity, a vicious bunch of thieves and drop-outs led by the brutal Mandrel. He tells the Doctor that he must use a stolen consume-card to obtain money from a cashpoint or else Leela will be killed.
The Gatherer of Megropolis One, Hade, has been alerted to the arrival of the TARDIS. He uses an electronic tracker to follow K9, who has now departed the craft in search of his master. K9 finds the Doctor and Cordo at a cashpoint where the Gatherer sees them and suspects they must be arms dealers. He orders his private guard, the Inner Retinue, to deal with them. When the Doctor tries the stolen card he is overpowered by a cloud of noxious gas and falls unconscious.
When the Doctor awakes he finds himself restrained in a Correction Centre alongside a similarly incarcerated man named Bisham. They are likely to be tortured, but the Doctor is as concerned for Leela, whom Mandrel threatened to kill if the Doctor did not return. Leela has defended herself though, and Cordo, who evaded capture, returns to the Undercity with news of the Doctor’s capture. This serves to increase Leela’s standing with the thieves and the threat over her life diminishes. The Doctor’s lot improves too when he is released for questioning by Gatherer Hade, but Hade is playing a game of double bluff. He has the Doctor released but orders his movements tracked, believing the Doctor will lead him to the heart of a conspiracy against the Company. Not knowing about this change in fortunes, Leela, Cordo and K9 attack the Correction Centre to try and rescue the Doctor. He has left, but they do succeed in freeing Bisham. As they depart the Centre they find all their possible travel routes blocked by Inner Retinue troopers.
Leela leads her friends in an attack on the guards, but she alone is injured in a skirmish and falls from a troop transporter they have commandeered. The Doctor has returned to the Undercity to find a very agitated Mandrel, who refuses to believe he could have been simply released after such a crime. Once more Cordo returns, this time with Bisham and K9, and defuses the situation when he explains what has happened to Leela. He also uses a stolen blaster to force Mandrel to stop threatening the Doctor. He asserts control and persuades the Undercity dwellers to start a revolution against the Company. Their first target will be the main control area where the Company engineers that PCM, a pacifying drug which helps keep the population servile, is being added to the air supply. Mandrel and his gang are also persuaded to start destroying the monitors throughout the Megropolis and to start spreading the message of revolt.
Leela is now presented to the Collector himself, an odious humanoid in a life-support wheelchair who is even more obsessed with money than Gatherer Hade, who fawns all over him. The Collector deduces from interrogating Leela that Hade’s conspiracy theory was unfounded and orders that Leela will be steamed to death in a public execution. He is especially pleased at a public steaming and arranges immediate publicity, unaware of the revolt spreading through the Megropolis. The Doctor heads off to rescue Leela from the steamer, but is running out of time.
The Doctor manages to save Leela in the nick of time, but the microphones set up to relay her death screams instead relay the sound of Mandrel warning the Doctor of how little time he has left to rescue her. The Collector is incensed and even more troubled when the revolution starts spreading even more quickly. Gatherer Hade is thrown to his death from the top of his Megropolis, and his normally dutiful underling, Marn, joins the revolution.
Leela and the Doctor head for the Collector’s Palace, and there he sabotages the computer system. The Collector arrives and is challenged by the Doctor, who discovers the being is a Usurian from the planet Usurius. He is really a seaweedlike being like a sentient poisonous fungus. The Doctor denounces his operation on Pluto, which consumed Mars as well as the population were moved from Earth. Before the Collector can implement a plan to gas the population of Pluto, Cordo and the lead rebels arrive and help the Doctor defeat the remaining members of the Inner Retinue. The Collector checks his computer to find the Doctor’s input has resulted in projected bankruptcy, and the shock of this causes the Collector to revert to his natural state in a compartment at the base of his wheelchair. The Doctor seals him in to be sure the threat is over, and he and Leela depart with K9, leaving Cordo, Mandrel and the others to contemplate recolonising the Earth.