The book is a first-person narrative in the form of Podkayne's diaries. Podkayne is 15 in Earth years (a bit over eight Martian years) while her genius younger brother Clark is 11 earth years. Due to the unscheduled "uncorking" (birth) of their three test-tube babies, Podkayne's parents cancel a much-anticipated trip to Earth. Disappointed, Podkayne confesses her misery to her uncle, Senator Tom Fries, an elder statesman of the Mars government. Tom arranges for Clark and Podkayne, escorted by himself, to get upgraded passage on a luxury liner to Earth.
During boarding, Clark is asked by a customs official "Anything to declare?" and facetiously answers "Two kilos of happy dust!" As he anticipated, his seemingly flippant remark gets him taken away and searched, just in time to divert attention away from Podkayne's luggage, where he has hidden a package he was paid to smuggle aboard. Podkayne suspects the reason behind her brother's behavior, but cannot prove it. Clark was told it was a present for the captain, but is far too cynical to be taken in. He later carefully opens the package and finds a nuclear bomb, which he, in typical Clark-fashion, disarms and keeps.
Much of the description of the voyage is based on Heinlein's own experiences as a naval officer and world traveler. Clark's ploy is taken from a real-life incident, related in Heinlein's Tramp Royale , in which his wife answers the same question with "heroin" substituted for the fictitious, but equally illegal, happy dust.
Once aboard, they are befriended by "Girdie", an attractive, capable, experienced woman left impoverished by her late husband. Much to Podkayne's surprise, the normally very self-centered Clark contracts a severe case of puppy love.
The liner makes a stop at Venus, which is depicted as a latter-day Las Vegas gone ultra-capitalistic. The planet is controlled by a single corporation; the dream of most of the frantically enterprising residents is to earn enough to buy a single share in it, which guarantees lifelong financial security. Just about anything goes, as long as one can pay for it. The penalty for murder is a fine paid to the corporation for the victim's estimated value plus his projected future earnings. On a less serious level, Heinlein anticipated, by over forty years, television ads in taxicabs (in the book, holographic), which have since been implemented in taxicabs in major cities worldwide.
The Fries are given VIP treatment by the Venus Corporation and Podkayne is escorted by Dexter Cunha, the Chairman's dashing son. She begins to realize that Tom is much more than just her pinochle-playing uncle. When Clark vanishes and even the corporation is unable to find him, Tom reveals that he is on a secret diplomatic mission, and the children have been his protective coloration—Tom appearing to be a doddering uncle escorting two young people on a tour of the solar system rather than the accredited representative to a vital conference on Luna that he is. Clark has been kidnapped by members of a political faction opposed to Tom.
Podkayne makes an ill-judged attempt to rescue Clark by herself and falls into the kidnappers' clutches as well—only to find her uncle caught too. The captors' scheme is to use the children to blackmail the uncle into doing their bidding at the Luna conference. Clark quickly realizes that once Uncle Tom is released, no matter what happens, their kidnappers will have little reason to keep their prisoners alive. He is prepared, however: he engineers an escape, kills his captors, and forgets to disable the nuclear bomb he had intended to go off only if they failed in their escape.
In Heinlein's original ending, Podkayne is killed. This did not please his publisher, who demanded and got a rewrite over the author's bitter objections. In a letter to Lurton Blassingame, his literary agent, Heinlein complained that it would be like "revising Romeo and Juliet to let the young lovers live happily ever after." He also declared that changing the end "isn't real life, because in real life, not everything ends happily."
In the original ending, after they escape from the kidnappers to a safe distance, Podkayne remembers that a semi-intelligent Venerian "fairy" baby has been left behind, and returns to rescue it. When the bomb that Clark leaves for the kidnappers blows up, Podkayne is killed, shielding the young fairy with her body. Clark takes over the narrative for the last chapter. The story ends with a hint of hope for him, as he admits his responsibility for what happened to Podkayne— that he "fubbed it, mighty dry" — then shows some human feeling by regretting his inability to cry and describes his plan to raise the fairy himself.
In the revised version, Podkayne is badly injured by the bomb, but not fatally. Uncle Tom, in a phone conversation with Podkayne's father, blames the parents— especially the mother — for neglecting the upbringing of the children. Uncle Tom feels that Clark is dangerous and maladjusted, and attributes this to the mother giving priority to her career. Clark still takes over as the narrator, and, again, regrets that Podkayne was hurt and plans to takecare of the fairy, this time because Podkayne will want to see it when she is better. This is the ending that appeared when the book was published 1963.
The 1993 Baen edition included both endings (which differ only on the last page) and featured a "pick the ending" contest, in which readers were asked to submit essays on which ending they preferred. The 1995 edition included both endings, Jim Baen's own postlude to the story, and twenty-five of the essays. The ending in which Podkayne dies was declared the winner. Among the reasons readers favored this ending were that they felt Heinlein should have been free to create his own story, and they believed the changed ending turned a tragedy into a mere adventure, and not a very well constructed one at that. This ending has appeared in all subsequent editions