After his father dies and his stepmother remarries, he runs away from the family farm. Following the ring road to a hobo camp, he finds a friendly face in Sam Anderson, a former Imperial Marine. Intending to sell his famous uncle's math books Max makes his way to Earthport, after a ride from a friendly trucker. (The friendly trucker who gives rides to down-and-out hitchhikers is a recurring theme in Heinlein's books.)
With the money from his books, Max and Sam (who had stolen the books and tried to sell them first!) get together and scheme to join the crew of a starship. Sam becomes a master-at-arms, and Max becomes a steward's mate third class (drawing on his hasty memorization of a borrowed book) after having his appearance aged somewhat by a cold-fingered matron in the back of a bar where beautiful young ladies serve colored water.
On board the starship, Max is assigned by accident to work he understands: cleaning up after animals on the bottom deck, including feeding passengers' pets. Eldreth Coburn, owner of a spider monkey Max had befrinded, discovers that Max can play 3-D chess and challenges him to a game (she lets him win, but we don't discover that until much later). Impressed with his ability, and perhaps somewhat romantically interested in him, she arranges for him to get a promotion to the ship's control room, where under the stern tutelage of Chief Astrogator Hendricks and the warmer but equally tough training of computerman Kelly, he becomes an Assistant Astrogator.
In a confrontation with Hendricks, Max sheepishly admits to faking his record to get into space and is told off (but, to his surprise, not exposed or punished) by Hendricks. "It's worse than wrong, it's undignified!"
When the aging captain sides with assistant astrogator Simes against Max (who found an error in the programming) and the ship turns up in uncharted space, the ship must land on a nearby planet. Admittedly lost, the ship is all but decommissioned and most of the crew help the passengers colonize their lovely new planet. But watch out for the centaurs and their throwing ropes!