The story of Anthem takes place in some unspecified future time and place in which freedom and individual rights have been obliterated. Collectivism — the political philosophy holding that an individual exists solely to serve the state — is dominant and has led to the establishment of a global dictatorship of the Fascist or Communist variety.
Equality 7-2521 is a Street Sweeper of the city, having been chosen for this profession by the Council of Vocations. However, he has always been fascinated by the phenomena of nature and can't help but wonder what power of the sky causes lightning and how it can be harnessed to human benefit. Because of his fascination with the Science of Things, he secretly desires to be sent to the Home of the Scholars. He has been taught that it is a sin to harbor secret ambitions, and so believes he is guilty, though strangely, he feels no pangs of wrongdoing.
One day while sweeping the streets, Equality 7-2521 comes upon a metal grill leading down into a dark tunnel. The tunnel is clearly a remnant of the Unmentionable Times, the ancient period prior to the establishment of the present society. Equality 7-2521 sneaks to the tunnel alone every night, where safe from others beneath the ground he secretly performs scientific experiments. As the story opens, this private research has been occurring for two years.
In that time, he also meets Liberty 5-3000. She is a young woman who works in the fields and lives in the Home of the Peasants beyond the city. Men and women are forbidden to take notice of each other except at the Time of Mating, the period each spring when the Council of Eugenics pairs off men and women into couples for one night for the purpose of procreating. But in his own mind, Equality 7-2521 takes such notice of Liberty 5-3000 that he gives her a different name. He thinks of her as the Golden One. He commits yet another transgression by speaking to her, and it is clear that she takes notice of him.
He has forbidden thoughts. In the night, he wonders about the Uncharted Forests that exist across the land, covering the cities of the Unmentionable Times. He thinks of the Script Fire in which the books of the Evil Ones were burned, and he wonders about the secrets of the Evil Ones that have been lost to the world. Mostly, he wonders about the Unspeakable Word, the one idea held by the Evil Ones that has been lost. He remembers the fate of one who had discovered that word and had spoken it. His tongue had been ripped out, and he was burned at the stake. As a 10-year-old child, Equality 7-2521 had witnessed the execution. The transgressor seemed noble, and the child had thought that this was the face of one of the Saints about whom children had been taught. To the young Equality 7-2521, this Saint of the Pyre seemed to have gazed at him, picking him out from the crowd of onlookers. What, he wonders late at night, is the Unspeakable Word?
In his experiments, Equality 7-2521 discovers electricity. He uses it, after much effort, to create an electric light. He thinks that this light can be used to light the cities of the world. He wishes to show it to others, but knows that they will not understand and be frightened. In a month, the World Council of Scholars meets in his city. He knows what to do. The wisest minds among humankind will be there. They are the only ones who can understand his gift. He will wait and show it to them, and they will know how best to employ it for the good of society. And he will be welcomed among them as one of the Scholars.
But when he demonstrates his invention, they are frightened. They call him an "evil wretch" for daring to think that a lowly Street Sweeper can possess greater wisdom than that of the Council. He has broken all the laws, and must be severely punished. Equality 7-2521 acknowledges that they are right and does not care what happens to him. But the light, he pleads. What will you do with the light? They point out that he is alone in believing that he has invented a great new product — and that what is not believed by all cannot be true. They point out that if he is right, then his discovery will bring ruin to the Department of Candles and confusion to the Plans of the World Council. For it took 50 years to get approval for the candle from all the Councils, and to change the Plans again so soon would be impossible. Their conclusion is unanimous: The light is an evil thing and must be destroyed.
Before they can seize it, he takes it in his arms, smashes the glass of the window with his fist and leaps through it. He runs through the streets of the city, escaping to the Uncharted Forest. He doesn't know where he is going — indeed there is no place to go — but he must get away. He believes that he will perish in the forest. He accepts that and is not afraid, only he wishes to be away from the city and from "air that touches upon the air of the city." He plunges deeper into the Uncharted Forest.
But he does not die. He awakens on the first day in the forest with a realization of freedom. There is no longer anyone to tell him what to do. The next day, he hears footsteps behind him. He hides in the bushes, but there is no need, for it is the Golden One. She had heard of his escape, because the whole city is speaking of it. On the night that she heard it, she bolted from the Home of the Peasants and followed his trail through the forest. She says she would rather be damned with him than blessed with all her brothers. He takes her in his arms, and that night he discovers that to make love to a woman is "the one ecstasy granted to the race of men." He is frightened only by the realization that he had lived for 21 years and never known what joy is possible to men.
They come upon an abandoned home from the Unmentionable Times. They enter it and wonder at the sights they behold — at the bright colors, the mirrors, the clothes, and the books. Equality 7-2521 declares that the home will be theirs. He finds that the books are written in the language that he speaks, and he reads them.
In his reading, he discovers the word "I." When he grasps its meaning, he cries tears of deliverance, realizing that this is the holy word that humans have had taken away from them. His reading teaches him that persons are individuals, not splintered fragments of the group; they have a right to pursue their happiness, and should not sacrifice themselves for others; that they require freedom to do this, and must not be enslaved by the group. When he understands this, he takes for himself a name he finds in his reading — Prometheus — the bringer of fire. The Golden One takes the name of Gaea — the goddess who was the mother of the earth. Gaea is pregnant with his child, who will be the first-born of a new society of free humans.
Equality 7-2521 learns that his light is powered by electricity, and that the men of the Unmentionable Times had mastered it. He will learn what they knew and use the knowledge to create prosperity. He will build electric wires around his house to protect it and will steal back into the city to free his friend, International 4-8818, and any others who flock to the banner of liberty. The society he founds will make scientific and technological advances because the human mind will not be shackled; it will be free to think, to ask questions, and to explore. He believes that, in time, the world will hear of this free and prosperous society, and that the best individuals from around the globe will flood the roads leading to his city. They will live together in respect of each individual's right to live his or her own life.