The movie shows a future in which the increasing population is ruining the Earth's surface. A group of scientists and intellectuals create the Tabernacle, a crystal device which gives them mental powers such as telekinesis, and gives them immortality by arresting their aging. Even if a person connected to the Tabernacle dies, their body is simply reconstituted exactly as it was before. The Tabernacle also creates an impenetrable forcefield around the scientist's compound, where they live on as the world collapses around them.
However, after centuries Human society has been reshaped by this new reality. The scientists, now known as the Eternals, have found their everlasting life to be stifling, even horrific. Worse, their penalty for criminals is to impose aging on them, locking them forever into bodies which are decayed and useless. Most Eternals desire only death, but have no way to achieve this as the Tabernacle is indestructible.
Meanwhile outside their shield, the remaining Humans, called Brutals, are once again breeding and threatening to overrun the planet. The Eternals control the population by using their advanced technology to create a false religion whose god, a stone head called Zardoz, chooses a group of Brutals to become "Exterminators", bandits whose main religious commandment is to kill as many people as possible, thus culling the population. The Exterminators also take slaves and force them to farm, raising food which they give to Zardoz - this is transported back to the Eternals as their food supply.
However, some Eternals are determined to end their living hell. To this end the Eternal who created and controls the Exterminators, Frayn, has been breeding them via eugenic principles to produce "supermen". He reveals to one of these, Zed, that Zardoz is a fake god by showing him the book The Wizard of Oz, from whose title he took the name.
Determined to investigate, Zed sneaks into the Zardoz head by hiding in the grain and is able to reach the home of the Eternals. They are unaware of the plot by Frayn and decide to study Zed, to see how regular humanity has changed over the centuries. He uses this opportunity to learn about the society and is finally able to locate the Tabernacle and make a psychic connection with it. Zed causes the Tabernacle to stop operating, bringing down the shield around the Eternal's camp, and the Exterminators outside swarm the compound and kill most of the Eternals. The Eternals are mostly delighted by this as they can finally die.
As Frayn brags that he has manipulated the Exterminators into doing what he wanted all along, Zed reveals a great irony - that the Tabernacle itself showed him that it had also recognized their way of life as a dead end and manipulated Frayn into executing his plan.
One of the Eternals, Consuella, leaves with Zed. The closing montage indicates that they lived out a normal lifespan, producing a son along the way, and then died.