Varley grew up in Fort Worth, Texas, moved to Port Arthur in 1957, and graduated from Nederland High School. He went to Michigan State University on a National Merit Scholarship because, of the schools that he could afford, it was the farthest from Texas. He started as a physics major, switched to English, then left school before his 20th birthday and arrived in San Francisco's Haight-Ashbury just in time for the "Summer of Love" in 1967. There he worked at various unskilled jobs, depended on St. Anthony's Mission for meals, and panhandled outside the Cala Market on Stanyan Street (since closed) before deciding that writing had to be a better way to make a living. He was serendipitously present at Woodstock in 1969 when his car ran out of gas a half-mile away. He also has lived at various times in Portland and Eugene, Oregon, New York, San Francisco again, Berkeley, and Los Angeles.
He has written several novels (his first attempt, Gas Giant, was, he admits, "pretty bad") and numerous short stories, many of them in a future history ("The Eight Worlds") These stories are set a century or two after a race of mysterious and omnipotent aliens have almost completely eradicated humans from the Earth (they regard whales and dolphins to be the superior Terran lifeforms and humans as only an infestation). But humans have inhabited virtually every other corner of the solar system, often through the use of wild biological modifications learned, in part, by eavesdropping on alien communications. His detailed speculations on the ways humans might use advances in biological science were revelatory in the 1970s when his story collection The Persistence of Vision was released. The title story in that collection won the Hugo and Nebula awards, and it has been suggested that "Overdrawn at the Memory Bank", which was adapted and televised for PBS in 1983, may have inspired some portions of the movie Total Recall (although the primary inspiration was clearly the credited source, the Philip K. Dick story "We Can Remember It for You Wholesale"). In addition, two of his short stories ("Options" and "Blue Champagne") were adapted into episodes of the short-lived 1998 Sci-Fi channel TV series Welcome to Paradox.
Varley spent some years in Hollywood but the only tangible result of this stint was the film Millennium. Of his Millennium experience Varley said:
"We had the first meeting on Millennium in 1979. I ended up writing it six times. There were four different directors, and each time a new director came in I went over the whole thing with him and rewrote it. Each new director had his own ideas, and sometimes you'd gain something from that, but each time something's always lost in the process, so that by the time it went in front of the cameras, a lot of the vision was lost."
Varley is often compared to Robert A. Heinlein. In addition to a similarly descriptive writing style, similarities include free societies and free love. Two of his connected novels, Steel Beach and The Golden Globe, posit a sub-society of Heinleiners. The Golden Globe also contains a society evolved from a prison colony on Pluto and a second society evolved from it on Pluto's moon, Charon—a situation most notably found in Heinlein's The Moon Is a Harsh Mistress. Unlike Heinlein's lunar society, Varley's convict society is a cross between the mafia and the yakuza, only more so.
Varley is noteworthy for the frequent prominence of female characters, unusual in science fiction, and especially so among male authors of hard science fiction. This prominence is visible not only in his Eight Worlds history where sex changes are routine, but in his other works as well. The idea of routine sex changes is also an example of the sexual themes that color his works without dominating them.
John Varley has also written a trilogy of novels set in a sentient hollow world reminiscent in structure to a very large Stanford torus space habitat, but with a distinctly different personality. The three volumes are titled Titan, Wizard, and Demon.