We is the thoughtful diary of a mathematician describing forthrightly how from the spring of one year through the autumn of the next, he is caught up in a revolutionary movement that helps him discover his human soul, only to lose it when the powers that be prevail.

Famed mathematician and rocket designer D-503 keeps a diary to convince people on other planets to accept the United State way of life. He and fellow Numbers live by a rigid Table of Hours. A glass Green Wall keeps the City separate from nature, and covert Guardians and the Operation Department with its dreaded Gas Bell protect society from dangerous people. Criminals are publicly executed by the Well-Doer's Machine. D-503's Integral, destined to take his diary and the works of all capable writers on its inaugural flight, is nearly complete.

D-503 is involved in a State sanctioned sexual "triangle" with rosy, round O-90 and his old school friend, the rising poet R-13. D-503 detests the seductive I-330 when they first meet. She breaks several laws in front of him and dares him to report her to the Guardians; when he fails to do so promptly, he becomes a criminal. Gradually, I-330 introduces D-503 to the chaotic world that the State has suppressed. D-503 grows aware that he is being covertly followed by S-4711, a hunchbacked, sloshing Guardian, one of I-330's lovers. I-330 seduces D-503 in the Ancient House, a State-run museum that she frequents. D-503 feels himself dividing into two persons, the dominant one being infused with I-330's ancient wildness. He knows that he is on a crash course towards the Well-Doer's Machine, and seems to have lost all of his friends. His obsessions increase, first with a soul that he discovers he has and which he struggles to understand; and with I-330, who replaces O-90 in his heart. O-90 tearfully offers not to stand in their way. D-503 still believes his Integral will spread happiness through the cosmos.

O-90 wants to illicitly bear D-503's baby, even if it means execution. I-330 continues testing D-503's loyalty and promises to reveal everything. On the Day of Unanimity, Numbers gather to re-elect the Well-Doer. A unanimous yea vote is expected, but I-330 is among a considerable group of dissidents who vote nay. She spirits D-503 outside the Wall to meet members of her underground group, survivors of a free humanity. She announces D-503 will help them highjack Integral. MEPHI signs crop up everywhere, a sign of contagion, and the Guardians charge into action. D-503 escapes arrest and commands Integral's test flight, which is postponed a day by the order mandating all Numbers submit either to the Great Operation or to the Well-Doer's lethal Machine. Pregnant O-90 is whisked to safety beyond the Green Wall. D-503 is a nervous wreck but manages to execute his duties automatically. When the coup is thwarted, however, D-503 sets Integral on a suicide plunge, which the mutinous Second Builder countermands.

D-503 is summoned to explain himself before the Well-Wisher, who finds him a naïve dupe of the revolutionaries. Feeling Doomsday has arrived, D-503 cleanses his soul before I-330 and S-4711, learns mathematically that the universe is finite, is arrested, and undergoes the Great Operation, which strips away fancy and love. I-330 undergoes torture but stubbornly says nothing. D-503 rejoices that a temporary Wall has gone up and Reason will prevail.