On Mars, Jim Marlowe and Frank Sutton travel to the Lowell Academy boarding school for the start of the academic year. Jim takes along his native, volleyball-sized pet, Willis the Bouncer, who is about as intelligent as a human child and has a photographic memory for sounds, which he can also reproduce perfectly. At a rest stop, Willis wanders off and encounters one of the adult sentient Martians. The three-legged alien takes the two boys and Willis to join a ritual called "growing together" with a group of its fellows. They also share water, making Jim and Frank "water friends" with the Martian, who is named Gekko.
At school, Jim gets into trouble with the authoritarian headmaster, Mr. Howe, who confiscates Willis, claiming that it is against the new rules to have pets. When Jim and Frank sneak into Howe's office and rescue Willis, the bouncer repeats two overheard conversations between Howe and Beecher, the unscrupulous colonial administrator of Mars, detailing Beecher's plans for Willis and the colony. When Beecher learns Howe has a bouncer, he is ecstatic, since the London Zoo is willing to pay a hefty price for a specimen. Worse, Beecher is secretly planning to prevent the annual migration of the colonists (necessary to avoid 12 months of life-threatening winter weather) in order to save money. The boys run away from school to warn their parents and the colony.
The boys set out to skate the thousands of miles to their homes on the frozen Martian canals. During the trip, Frank gets sick. On the third night, they are forced to take shelter inside a giant Martian cabbage plant (nearly suffocating when it folds up at night). The next day, they meet some native Martians, who accept Jim because of his relationship to Willis and water-friendship with Gekko. The Martians treat Frank's illness and send the two boys home by a swift subway.
Once warned, Jim's father quickly organizes the migration, hoping to catch Beecher off guard. The colonists take over the boarding school, and they turn it into a temporary shelter. Howe locks himself in his office, while Beecher sets up automatic, photosensor-controlled weapons outside to stop the malcontents (as he calls them) from leaving. After two colonists are killed trying to surrender, and the power to the building is cut, the colonists decide they have no choice but to fight back. The colonists organize a raiding party, with the boys taking part, capture Beecher's office and proclaim the colony's independence from Earth.
Several Martians enter the school area, and one of them shows up in the door leading to Howe's office, hiding him from sight. When the Martian turns away, Howe is nowhere to be found. The Martians then go to Beecher's building, and when they leave, he has also vanished. The Martians had been content to allow humans to share their planet, but Beecher's threat to Willis has made them reconsider. They present the colonists with an ultimatum: leave the planet or else. Dr. MacRae negotiates with the Martians, and is able to persuade them to let the colonists stay, mainly because of Jim's strong friendship with Willis.
MacRae theorizes that Martians start life as bouncers, metamorphose into adults, then continue to exist after their deaths as the "old ones." In the end, Jim resigns himself to giving Willis up so he can undergo the transformation to adulthood.
As with Podkayne of Mars , there are two versions of the ending. As originally written (and published much later) it is made clear that Willis will not emerge as an adult for forty years. This was edited and changed by Heinlein's publishers, as was a discussion early in the novel in which MacRae expresses strong support for adults and older children being free to carry handguns, and opposition to any government which would restrict that.