It is the year 2075 and the moon has become the prison where those back on Earth sends it prisoners. These inmates are popularly known as “Loonies” and there are several million of them living underground. The conditions are such that things have become ripe for a revolution.
Manuel Garcia O’Kelly Davis—know simply as Mannie to pretty much all—is a computer technician whose memoirs comprise the narration of the story. The “warden” in charge of the lunar penal colony is named Mike. Well, actually, he is called Mike by Mannie. Mike is a super-computer in charge of running the show and Mannie has just made a shocking discovery: Mike has achieved sentience. The computer has become aware of itself. Needless to say, Mannie decides to keep this discovery to himself since a self-aware machine is the kind of thing with the power to, well, disrupt humanity’s view of its own self-importance.
The story that Mannie proceeds to relate is essentially the story of a revolution. It is by sheer accident that the politically naïve Mannie find himself drawn into a revolutionary plot. At a secret meeting called by the revolutionaries, the armed guards unexpectedly show up and Mannie further involves himself by assisting in the escape of Wyoming “Wyoh” Knott, a beautiful blonde woman who, naturally, enchants Mannie. As often happens in these kinds of relationships, Mannie lets his guard slip and Wyoming becomes the second person to become aware of Mike’s sentience. Sometime later a third party joins the party: Professor Bernardo de la Paz. The professor is considered by Mannie to be a mentor and his intricate knowledge of how to create a revolution finds the perfect complement in Mike’s comprehensive knowledge of every aspect of the lunar colony. In actuality, the bulky part of the novel which details the step-by-step growth of the revolution is fascinating, but in summary it can be described in a sentence fragment: subversive activity runs rampant on the moon.
All this revolutionary undertaking collides with a major event: the brutal rape and murder of a Lunar girl by the Authority Peace Dragoons. This event precipitates an armed insurrection which leads to the Loonies taking over fragile control of the lunar colonies. The uncertain state of this coup leads to Mannie engaging in diplomatic negotiations back on earth. As often happens with these things, the attempt to negotiate a diplomatic settlement to the crisis spurs an attempt to wrest control back from the Loonies through a military invasion only to be turned into the latest example of a superior military force overwhelmed by an enemy who wants it more. When this attempt to impose authority through force fails, autonomy over the newly created Lunar Republic is conceded by Earth.