Steve Jobs claimed that dropping acid was one of the most important things he had ever done in his life. “LSD shows you that there’s another side to the coin,” he said, “and you can’t remember it when it wears off, but you know it.” Jobs’s openness to psychedelic experiences is an aspect of his formative years that’s often invoked to help shade in his genius, a way of decoding the inputs and stimuli that allowed him to—as the billboards used to say—“think different.” Last year, one of Jobs’s comrades from those shaggier days, Daniel Kottke, described their acid trips as fairly typical: they were “monk-wannabes” who would go hiking and listen to music, talk about consciousness, attempt to read books. And then, like many of their generation, they grew up. By the time both of them were involved with Apple, in the late seventies, Jobs had rerouted his creativity toward something less ephemeral. “Once Apple started,” Kottke, who would be one of the company’s first employees, said, “Steve was really focused with all of his energy on making Apple successful. And he didn’t need psychedelics for that.”

Stories like these have become a familiar way of linking the woolly, adventurous counterculture of the sixties with the innovations of Silicon Valley. Inevitably, though, they have the effect of distancing the past from the present. We celebrate the ideas that persisted, and valorize the survivors who made something of themselves, but, from a contemporary perspective, the most intrepid fringes appear more remote than ever. “Heads: A Biography of Psychedelic America,” a meticulously researched new book by the journalist and radio d.j. Jesse Jarnow, attempts to complicate and extend the history of psychoactive drugs in this country. Jarnow details the emergence of a psychedelic sensibility in the sixties and seventies, a sensibility given coherence by the music of the Grateful Dead, whose visions of a cosmic Americana would inspire religious levels of devotion, and by networks of LSD advocates and distributors. Jarnow builds this history as a ground-up affair, toggling between the boldface names and forgotten visionaries, low-level dealers, failed entrepreneurs, and Deadhead computer programmers. Jarnow himself was too young to experience the sixties firsthand, but this distance lends his investigation a kind of innocent verve. He is vigilant in his attempt to understand the idealism of the past on its own terms, and to regard the “head”—the archetypal, open-minded sixties explorer—as someone whose skepticism toward power structures and authority might still resonate with us today. It’s just that, back then, such an explorer might have found a little more help along the way.

Lysergic acid diethylamide was first synthesized by the Swiss scientist Albert Hofmann in 1938, although he would not discover its illuminating effects until five years later, when he unknowingly handled and then ingested a small amount. Hofmann would call LSD “medicine for the soul,” a view shared by many devotees of psychedelic substances. The effects of LSD on consciousness and perception fascinated psychiatrists and the military alike. Sound or light comes to feel euphoric, porous; clinical studies have shown that users enter a state of uninhibitedness similar to that of a baby. Throughout the fifties and sixties, various experiments were conducted to study its practical uses; the C.I.A.’s notorious Project MKUltra explored the possibility that the drugs could be deployed for mind control. Of course, the drug held great recreational appeal, as well, and the most famous figure to emerge during this period, Timothy Leary, would eventually leave academia—he had been the head of Harvard University’s short-lived Psilocybin Project—and become a prominent advocate for LSD as a path toward “internal freedom.”

Inquiries into the drug’s therapeutic potential have had something of a resurgence lately, as Michael Pollan wrote about for this magazine last year; just last week, researchers in England released images of the neural activity of patients who were tripping on LSD. And, of course, recreational use persists. Even so, as I read Jarnow’s chapter on the innocent, halcyon days of LSD experimentation, the mid-sixties started to feel further away than the seventeen-hundreds. It was easy to understand the central players’ ambitions—their visions of freedom aren’t so different from ours—but it was nearly impossible to imagine the world they found themselves in; I kept anticipating the nation’s inexorable tilt back toward its Puritan roots, its choice of law and order over mind expansion. Reading history sometimes requires us to briefly pretend that we don’t know what happens next, so that we can genuinely grasp that another future was once possible. This is hard to do. A sadly ominous feeling descends, for instance, when Jarnow describes a January, 1967, conference on psychedelics at San Francisco State University, which brought together scientists, therapists, and assorted idealists. The following year, LSD would be outlawed.

Perhaps it was entirely predictable that that spirit of adventure and communalism would be tamed. Jarnow discusses the tension between “hip economics”—the underground economy of barter and subsistence propped up by the drug trade—and “hip capitalism,” which borrowed the vibes of the sixties idealists in order to market countercultural cool. And he’s reluctant to give up hope on the former, even though the latter has emphatically triumphed: “Until a head can invent something so wonderful that it transcends money,” he writes, “American currency will act on the hip economy like gravity, keeping the new alternate universe tethered to the traditional United States and reality at large.” The most vivid thread that runs through “Heads” is the one that follows this divide, between the sometimes deadening rhythms of the real world and the enduring fantasies of something different.

A central figure in the book, and one of the most absorbing characters of the postwar era, is Stewart Brand. In 1968, he began publishing the “Whole Earth Guide,” a mail-order catalogue of “tools” that suggested another way of living was within reach. Through the catalogue, you could buy the blueprints and materials to build a geodesic dome, guides to Japanese landscaping techniques, work boots and moccasins, macrobiotic cookbooks, and academic journals that categorized psychedelic experience. All of it was offered under the ethos, derived from Deadhead philosophy, that information seeks to be free. (The “Guide” and its goods, of course, weren’t free—a reminder that the “back-to-nature” movement was still “tethered” to the American reality.)

Brand would go on to become an early participant in online communities. Computers, he said, were maybe the best news “since psychedelics.” In the seventies, computer science was a field dominated by “heads.” At research centers—such as the Stanford Artificial Intelligence Laboratory, where one programmer planted marijuana just outside the office—it wasn’t unusual for early explorations of networking and information sharing to borrow directly from Deadhead communalism. E-mail was refined as programmers used it to sort out ridesharing to Dead concerts. The notion of “shareware” was pioneered by Bob Wallace, a lifelong psychedelic-drug advocate—and one of the first employees of Microsoft. Wallace was also, as Emily Witt noted in the magazine last year, “the first donor and major supporter” of Erowid, a Web site that strives to provide reliable information about psychoactive substances.

Over the past decade, several books have retraced the links between figures such as Brand and Wallace, sixties counterculture, and the early days of the Internet. But few accounts preserve the gleeful idealism of the “head,” or consider the turn from psychedelic exploration to the amorphous hierarchies of the Silicon Valley workplace as a form of pragmatic surrender. For Jarnow, it’s important to remember the entire scope of our past, not just the parts that flatter us today. His book is less trippy than you might expect, and the evenness of his tone helps normalize the urges and visions of his characters. It also makes the sadder, less remembered stories—like that of Karen Horning, a young Deadhead with a small stash of acid who was given six life sentences during one of the Drug Enforcement Agency’s early-nineties anti-LSD sweeps—seem all the more tragic.

The book closes with a conversation about surveillance between Edward Snowden and John Perry Barlow, a cyber-libertarian advocate and onetime lyricist for the Dead. The discussion took place a year after Snowden leaked his cache of N.S.A. files; the two spoke, over videoconference, at the Personal Democracy Forum. We have come to accept the narrative linking the sixties to modern-day computing—but what happened to the promise of freedom that first animated the heads? For Jarnow, the promise of psychedelic escape provides a relevant subtext for their talk about frontiers and the appetite for “danger” that links Barlow’s past with Snowden’s present. Barlow and his friends and associates once dreamed of living off the grid; Snowden describes just how impossible that has become. Recounting their exchange, Jarnow fights off despair. “Dystopia is here in full,” he writes, referring to the seeming impossibility of pursuing a peaceful existence free of the government’s gaze, “but only for those who want it.” He points to all that the past has taught him, to the persistence of kinship and community and the dream of “true inner freedom.” There is always another side of the coin.