Later in life, as a libertarian, he would rail against “loafers” and the welfare state but in his leftist days he knew how much he depended on the government. As he acknowledged in a 1941 letter, “This country has been very good to me, and the taxpayers have supported me for many years.” The popularizer of TANSTAAFL ate more than his share of subsidized meals.

In discovering his midlife vocation as a science-fiction writer, Heinlein was aided immeasurably by his second wife Leslyn, who he married in 1932 (an earlier marriage in 1929 fizzled after a year). Both were socialists and sexual radicals—it was an open marriage with each having many lovers—and in the 1930s both were leading figures in the grassroots movement End Poverty in California (EPIC), working to push the Democratic party to the left. When Heinlein started selling science fiction in 1939, Leslyn served as his un-credited collaborator and story-editor.

Heinlein’s early science fiction was distinguished by its extrapolative rigor. Usually working with the parameters of real science, he speculated on how space travel and nuclear power would change society. Occasionally he would write an oddball solipsistic fantasy like the story “They” (1941), where the narrator correctly figures out reality is a sham. But in his early career, this type of solipsism was mostly a vacation from the main business of creating an imaginatively inhabitable future.

Heinlein’s leftwing politics got him blacklisted from the Navy, which didn’t want his services even during World War II when the military was so desperate for trained recruits that they found office jobs for disabled soldiers. Instead he worked as a civilian engineer in Philadelphia, helping to design the high-altitude pressure suit, a precursor to the astronaut suit. In 1944, Heinlein met Lieutenant Virginia Gerstenfeld, and after the war tried to bring her into his house as part of a ménage à trois. Gerstenfeld accepted but her stay with the Heinlein’s was brief and stormy. This wasn’t the first love triangle in the Heinlein residence (they had earlier been in a consensual threesome with L. Ron Hubbard), but Leslyn found Virginia threatening so the marriage collapsed in 1947. Heinlein and Gerstenfeld wed the following year, a marriage that would also be open.

Whereas Leslyn was a liberal Democrat, Virginia was a conservative Republican. Some of Heinlein’s friends speculated that his shift in politics was connected to his divorce and remarriage. That’s too simplistic an explanation, but Heinlein acknowledged that Virginia helped “re-educate” him on economics.

In truth, Heinlein’s shift to the right took place over a decade, from 1948 to 1957. In the early 1950s, the Heinleins travelled around the world. The writer was already a Malthusian and a eugenicist, but the trip greatly exacerbated his demographic despair and xenophobia. “The real problem of the Far East is not that so many of them are communists, but simply that there are so many of them,” he wrote in a 1954 travel book (posthumously published in 1992). Even space travel, Heinlein concluded, wouldn’t be able to open enough room to get rid of “them.” Heinlein treated overpopulation as a personal affront.

Heinlein had caught a bad case of the Cold War jitters in the late 1940s. He accused liberal Democratic friends, notably the director Fritz Lang, of being Stalinist stooges. With Heinlein's great talent for extrapolation, every East-West standoff seemed like the end of the world. “I do not think we have better than an even chance of living, as a nation, through the next five years,” he wrote an editor in 1957. The USSR's Sputnik launch in 1957 and Eisenhower’s moves toward a nuclear test ban the following year both unhinged Heinlein, who called Ike a “slimy faker.” By 1961 Heinlein concluded that even though it was a “fascist organization,” the John Birch Society was preferable to liberals and moderate conservatives.

The turning point came in 1957. After that year, Heinlein's books were no longer progressive explorations of the future but hectoring diatribes lamenting the decadence of modernity. A recurring character in these books—variously named Hugh Farnham, Jubal Harshaw or Lazarus Long—is a crusty older man who's a wellspring of wisdom. “Daddy, you have an annoying habit of being right,” runs an actual bit of dialogue from Farnham’s Freehold (1964). In the worst of Heinlein's later books, daddy not only knows best, he often knows everything.

Only on the issue of sex did Heinlein remain faithful to the radicalism of his youth, with some of his late books portraying a future where bisexuality is the norm. Yet even on sex, late-period Heinlein is an untrustworthy guide. Many readers have been disturbed by the pro-incest arguments found in such books as Farnham’s Freehold, Time Enough For Love (1973), and To Sail Beyond the Sunset (1987). Perhaps the best that can be said on Heinlein’s behalf is that incest served as an objective correlative to his libertarianism and solipsism. What better way of being an independent free agent than by sleeping with your closest kin

Going further: Isn’t the truly self-made man also self-engendered? In his explorations of the mechanics of self-pleasuring and self-creation, Heinlein made Philip Roth look like a piker. In Heinlein’s 1959 story “All You Zombies—,” a combination of time travel and a sex-change operation allows the protagonist to become his/her own mother and father. In I Will Fear No Evil (1970) a 94-year-old billionaire first has his brain implanted in the body of a 28-year-old black woman and then has his frozen sperm impregnate that body.

Taken together, Heinlein’s books in his right-wing phase hardly add up to a logical worldview. How do we reconcile the savage authoritarianism of Starship Troopers with the peace-and-love mysticism of Stranger in a Strange Land? For that matter, how do those two books jibe to the nearly anarchist libertarianism of the Moon Is a Harsh Mistress? On a more practical plain, how could Heinlein have called for both limited government and a NASA committed to colonizing space (surely a big government program if there ever was one)? TANSTAAFL went out the window when a space or military program caught Heinlein’s fancy.

But all these books share one trait: They ignore the consequences of people's actions. Starship Troopers gives us war without PTSD and guilt over slaughter (the aliens are Bugs, so can be exterminated without remorse) just as Stranger in a Strange Land is a vision of sex without strings ("grokking" means never having to say sorry). In other books, Heinlein gave us incest without trauma.

Heinlein described some of his books as being “Swiftian” in intent. Regrettably, Heinlein lacked the rhetorical control of the Gulliver’s Travels author. Aside from a 1941 Yellow Peril novel, Heinlein had a strong record as a critic of racism. But in Farnham’s Freehold, Heinlein wanted to use inversion to show the evils of ethnic oppression: he took a middle-class white family and, via a nuclear explosion, threw them into a future where Africans rule the earth and enslave whites. So far, so good. Yet Heinlein’s Africans aren’t just a master race, they also castrate white men, make white women their concubines, and eat white children (white teenage girls being especially tasty). Preaching against racism, Heinlein resurrected some of the most horrific racial stereotypes imaginable. Farnham’s Freehold is an anti-racist novel only a Klansman could love.

In his old age, Heinlein turned his back on the future. His novels became nostalgic, masturbatory fan-fiction where he resurrected characters from earlier books and linked them into a single tapestry of interconnected self-referential novels. Even when he wrote about the future it was in terms of the past. In Time Enough For Love, we’re told that the spaceships that spread humanity across the stars are “the covered wagons of the Galaxy.” Frontier America becomes the goal to aspire to, not the past we want to build on. In the same novel, Heinlein’s alter ego Lazarus Long returns to the Kansas of the early twentieth century (a “happy” time, we’re told) and sleeps with his mother. What a depressing fate for a novelist who once was a gateway to tomorrow: wallowing in self-absorbed, sentimental reveries.

A biographer with an analytical edge might have examined the role self-obsession and political extremism played in hampering Heinlein’s late fiction. Patterson’s hagiographic approach not only skirts the issue but simply gives us Heinlein’s solipsism in a new form: this is a biography where there is no reality outside of Heinlein to challenge the man’s ideas or actions.

This article has been updated and corrected. A previous version misstated the title of 1964's Farnham’s Freehold.