Henry David Thoreau had a genius for inspiring haters. More than 160 years after Walden first appeared, that genius is undimmed. In a 2015 New Yorker essay memorably titled “Pond Scum,” Kathryn Schulz called him “narcissistic,” “pinched and selfish,” “as parochial as he was egotistical,” and an execrable writer whose best-remembered work is “unnavigable” and “fundamentally adolescent.” In his own time, satirical poets derided him as Ralph Waldo Emerson’s dwarf, a stubby-legged imitator of the more famous Transcendentalist.

When I teach Thoreau to law students and undergraduates, they tend to agree with the “Pond Scum” assessment. They find him vain; they leap to defend the “old people” that Thoreau insisted had nothing to teach him, the shopkeepers he called “occupied with the factitious cares and superfluously coarse labors of life.” They suspect that he failed to check his privilege by reflecting on the conditions that enabled a Harvard-educated young white man to wander freely in the woods for a while, without fearing his neighbors or the dark. I would bet that fewer Americans have read Walden than have heard that Thoreau’s mother did his laundry.

Yet Thoreau persists. Laura Dassow Walls, who teaches English at Notre Dame, has written an engaging, sympathetic, and subtly learned biography that makes a strong case for Thoreau’s importance; she also seems a little baffled that anyone could fail to admire him. Her Thoreau was an abolitionist who brought Frederick Douglass to speak at the Concord Lyceum—a kind of community university—and participated in the Underground Railroad, to the point of risking charges of treason by helping enslaved people flee to Canada. While living at Walden, Thoreau hosted the annual festival of the Concord Female Anti-­Slavery Society, where the speakers included Lewis Hayden, who had escaped slavery in Kentucky. He was deeply interested in the indigenous cultures that remained in New England, seeking out conversation and even friendship with Native Americans, studying the Wampanoag language on his own while at Harvard, and filling more than 3,000 notebook pages with material from these investigations. He also lived in a household of strong women: His sisters set the pace in antislavery activism, and Thoreau willingly took his cues from them. He even admired and sympathized with the laborers building the railroads that would clatter along the edge of his beloved pond.

The details are sometimes wonderful. On November 1, 1859, Thoreau defied the forces of law and order and the pleas of respectable friends by delivering a defense of John Brown to 2,500 people in Boston. “The reason why Frederick Douglass is not here,” he began, “is the reason why I am.” If every privilege check had that kind of snapping specificity and quiet moral thunder, they might be both more subversive and less disdained.

Thoreau’s political engagement isn’t exactly news, but Walls foregrounds it vividly to show him as part of a set of engaged communities: radical Concord, the Transcendentalist network, the abolitionist movement, and his own militant family. Far from being a hermit, the Thoreau that Walls portrays is, above all else, a social and political creature. He travels to Brooklyn for a visit with Walt Whitman (“It is as if the beasts spoke,” Thoreau wrote of Leaves of Grass) and elsewhere spends evenings with both Douglass and Brown. A key part of his early formation was working as a teaching apprentice under Orestes Brownson, the Catholic convert and proto-socialist who figures prominently in the history of American left-wing thought. He also spent time with the Alcotts and Nathaniel Hawthorne—­who, Walls tell us, used Thoreau as the basis for the title character of The Marble Faun, a moody aristocrat rumored to be descended from satyrs.

Yet Thoreau was no aristocrat, Walls reminds us, no matter how he might have struck Hawthorne. He wasn’t a laborer’s son, as Brownson was, and he came from some means. But family members kept dying at inconvenient times, and the result was a life spent somewhere between what George Orwell called the “lower-upper-middle class” and Europe’s impoverished aristocrats. Thoreau found time for hiking trips and boating expeditions with college friends, and the family rose economically during his lifetime, becoming the leading pencil manufacturers in North America. But he always had to work for a living, including stints in his family’s pencil factory, as a schoolteacher and a surveyor, and years as a handyman, doing jobs that could be fitted in between writing and walking.

This all remained true during the two years he lived at Walden Pond. The heart of Walls’s defense in l’affaire laundry is that even at Walden, Thoreau remained an economic member of the household, as he did all his life—contributing wages from his paid labor, building and doing repairs, and, yes, accepting meals and clean clothes in a gendered division of labor that was then universal, even in an egalitarian household like the Thoreaus’.

But this does lead to a question: What exactly was the point of those two years, or the resulting book, subtitled “A Life in the Woods”? Thoreau moved to Walden in 1845 and built a simple cabin, much of it with materials purchased and repurposed from an Irish laborer’s shanty. The property was Emerson’s, making him Thoreau’s landlord, and it was an easy walk from town, in an area that the locals used for fishing, timber, and picnics. Nonetheless, it was enough of a change from home and town life that Thoreau hoped to find out “what are the true necessaries and means of life,” to make an “experiment” of his own existence and record the results. His experiment in material simplicity was also an exercise in shaping a style and a self.

This is where Walls connects Tho­reau’s political commitment with the proto-­ecological nature writing for which he is best known. Walls has written three previous books on the literary and philosophical significance of 19th-century natural science—­one apiece on Thoreau, Emerson, and Alexander von Humboldt—and here she puts Thoreau’s growing recognition that everything in the world is connected at the heart of his political ethics.

Thoreau, she argues, wrote to take the measure of his life, to consider what he needed and what needed him, where his debts and his responsibilities lay. Although this mission required an initial declaration of independence from all entanglements to clear accounts—he famously wrote that he moved to Walden on the Fourth of July—that was a step toward a deliberate and reflective re-rooting. Thoreau studied the landscape and wild things, studied his townsmen from a middle distance, and, through it all, studied himself. He concluded that none of these things could be seen whole if they were viewed in isolation from the rest.

When the Billerica mill dam stopped up the Concord River, the latter flooded and drowned thousands of acres of meadows where Thoreau had marked the year’s calendar by the dates of the farmers’ haying. (Thoreau was hired to make an intensive study of the river, in preparation for an unsuccessful lawsuit to bring down the dam.) Ice cut from Walden—the eye of the world, he sometimes thought—was shipped to India for refrigeration, and as cultural compensation for this early example of globalization he received the Bhagavad Gita, which he saw as full of thoughts as clear as Walden’s water. Hoeing weeds from his bean field, Thoreau knocked his blade against buried arrowheads and thought of the first inhabitants of the place, still remembered in the soil. Listening to the Concord militia drill during the Mexican-American War and reading about the Fugitive Slave Act, he realized that he could not separate himself from the crimes of his country, however much he would have liked to do just that. And so the writer and naturalist, who modeled himself on what he took to be the Hindu ideal of the renunciate holy man, became an activist because he could not help being a citizen, and because as a citizen he could not help being implicated in his country’s intolerable wrongs.

The natural world is deeply woven into Thoreau’s writing, as it was in his life. His work returns at key moments to a mysticism that is not ethereal but material. Thoreau hungered to feel his connection with the rest of the world, to know with all his being that he and the soil, the trees, and the rivers of New England were all patterned matter, shot through with the same energy of life. He seems to have felt fully alive only when joined to a world he saw in vitalist terms—a world infused with a kind of “life-energy” that gave experience its sense of impulse, form, and purpose.

Thoreau borrowed some of this thought from Emerson, whose first major work, a short book called Nature, appeared as Thoreau was finishing college and soon obsessed the young student. Drawing on Romanticism and German Idealism, Emerson claimed that the mind and the world arose from the same ordering principle, as if each spoke the same underlying thought but in two different languages. Emerson urged his readers toward an intuitive grasp of this unity, in which self and world would reconnect. Depending on your mood, this breed of secular mysticism can be stirring or irritating; in either case, Emerson never translated it into the kind of closely documented everyday activity that became Thoreau’s métier.

Thoreau’s transcendentalism, however, was of a more material nature. He weaved Emerson’s mysticism into his work as a naturalist, finding that one could gain access to the world’s ordering principles not in a lightning-like glimpse of the cosmos, but by attending to particulars. One could find the world’s unity in a leaf, or in the seasonal patterns that he studied with such care that, he boasted to Emerson, he could tell the calendar date within a few days by the flowers that were in bloom.

Thoreau once spent a week carefully determining the dimensions of Walden Pond, concluding that its lines of greatest width and breadth crossed at its deepest point—a fact that, for him, ratified its symbolic role in the book by suggesting that the pond could stand for a sort of Platonic epitome of insight. His journals are so scrupulously attentive to the annual arrival and disappearance of plants that they have become a trove of data for climate scientists studying long-term ecological change. Thoreau, who was pleased to be inducted into the Boston Society of Natural History, would have been delighted; but he would also have insisted that the ultimate value of all this attentiveness was not to gain empirical knowledge of the world, but to know its inner divinity.

Walls’s Thoreau is truly a man for all seasons, a person who, in many ways, is a 21st-century liberal’s idea of our best self: pro-­environmental, antiracist, anti-imperialist, feminist, reformist, spiritual but not religious. It is extraordinary how much there was in Thoreau to support this interpretation, and part of the power of Walls’s book is how she traces these liberal and humane preoccupations to the radicalism of his family and of Concord’s intellectual life, of which Hawthorne wrote: “Never was a poor, little country village infested with such a variety of queer, strangely dressed, oddly behaved mortals.” Like any other form of personality, radical individualism emerges from a specific social ecology—strangely, something that the ecologically minded Thoreau never really acknowledged.

But Walls sidesteps the reasons that people have bristled at Thoreau, including those who knew him in person. She takes for granted his genius and likability; his critics, she suggests, just failed to understand him. This defense comes at some intellectual cost: By downplaying the ways that Thoreau was and is alienating, she misses the chance to consider how his appeal and his unpleasantness might be linked. For Walls, Thoreau’s ecology means solidarity: “‘Resistance,’” she writes, “means…defense of all those lives entangled with our own,” including slaves, Mexicans, Indians, and “the nonhuman world.” Well, yes. But also, no.

It is not just that Thoreau’s supreme concern with personal liberty and conscience led him to write things like “It is hard to have a Southern overseer; it is worse to have a Northern one; but worst of all when you are the slave-driver of yourself.” The pattern is more general. Thoreau resisted the familiar forms of political solidarity. Philanthropists, abolitionists, and reformers of all kinds filled him with a sort of queasy disgust, as if, by claiming the moral high ground, they were trying to get their clammy hands on his soul. Thoreau’s radicalism was always aimed at the conditions for integrity, even purity.

He described most of the existence that Europeans had led in North America as a sort of walking death, not fundamentally because they were involved in injustice, but because they were not spiritually awake. He believed that the greatest force of social transformation was the extraordinary individual, who, by achieving a new level of moral and psychic freedom, could show others how to live. His politics were not, in the ordinary sense, political or even social, but rather moral. He often missed the importance of precisely the kinds of collaboration and mutual support that had formed him in Concord, created the Underground Railroad and the abolitionist movement, and generally provided much of the stage on which he worked out his own idiosyncratic dissent.

Thoreau was sometimes less coherent, less in control of his own thinking, than Walls allows. She writes that his “test of human virtue was allowing all beings, human and nonhuman alike, to flourish in their own ways,” including through a kind of radical self-acceptance. But at times, when he was waxing expansive, Thoreau could sound a bit like a red-blooded American imperialist, echoing the slogan “Westward the star of empire takes its way” in his pronouncements about how, when he “beheld the Indians moving west across the stream” (the Mississippi River), “I felt that this was the heroic age itself,” and arguing “I think that the farmer displaces the Indian even because he redeems the meadow, and so makes himself stronger and in some respects more natural.” These passages all come from the late essay (and hit lecture) “Walking,” which, Walls tells us, Thoreau regarded as a key to the future work that he never produced. One wonders what we might have felt about this work if he had completed it.

When Thoreau’s moral disapproval was most sharply focused, he could oscillate between self-righteousness and self-disgust. He wrote in Walden: “Our whole life is startlingly moral…. Listen to every zephyr for some reproof, for it is surely there.” He warned against the “reptile and sensual” spirit that lurked in every person, perhaps himself most of all: “All sensuality is one, though it takes many forms.” For Walls, these ascetic and self-repressing impulses relax and get worked into a more genial spirit in later passages. There is something to this, but the fact remains that Thoreau’s radicalism and social wariness were, at times, closely bound to misanthropy and self-righteousness, while his more world-embracing passages could also make room for the political violence and inequality that he denounced elsewhere. His writing records a painful struggle in thought and feeling more than any satisfactory resolution.

And yet this record of struggle and self-criticism is also why Thoreau survives. The writing has the rawness of alienation, and the confusion that comes with seeking ways to affirm a world that often seems repugnant and intolerable. Thoreau’s sense that his nation had gotten under his skin and polluted him, that it had ruined even his walks in the woods, that his mind plotted rebellion even when he preferred to direct it toward sketching leaves, should hardly be strange. Who has not felt such bouts of political anger and frustration in our moment?

Thoreau found that the political was personal, and although he hated it for that, because his first attachment was to the personal, he was too honest to pretend otherwise. So he turned it into an art, a means of making sense of his world. He wrote about being trapped in America and in a beautiful, half-ruined world whose beauty and ruin were inseparable. He wrote, too, as an awkward, often chilly person of overwhelmingly strong feelings that were sometimes opaque even to him. And he wrote about solitude, throwing his word-ropes to others again and again, because he did not want to be alone but often felt most isolated in the presence of people. “Could a greater miracle take place than for us to look through each other’s eyes for an instant?” he asked in Walden. He died with the question unanswered.

Late in Walden, in the chapter titled “Spring,” Thoreau goes walking during the year’s first thaw. He pauses at a bank of bare, sandy soil, ripped open by a railroad cut at the edge of Walden Pond. He watches the thawing dirt slide and roll, streaming in and out of patterns, and reflects on the ways that the human body, the waterways of the earth, and every plant and animal are just more matter forever changing shape. For a moment he is at home with himself and all of the planet’s “slimy, beastly life,” and rather than being disturbed by the railroad and the changes it has brought, he seems at peace with them. He took this ambivalent attitude toward modernity and the railroads to his deathbed, dreaming that he was the railroad cut near Walden where he’d once watched the spring come. But in his dream, the railroad was not being cut into Walden’s earth; rather, the workmen were laying down rails over his lungs.

Was this last painful image one of despair at the coming of death and modernity? Or, as in Walden, was he expressing a strange kind of relief and acceptance? The railroad cut was an act of industrial violence against the land, but it also provoked within Thoreau a vivid experience of the oneness of all of life—the natural world and the modern, human-made one. When his mind circled back to this experience at the end of his life, this sense of oneness had not left him. He was not imagining Walden as some Ar­cadian idyll, but as part of an ever-changing and increasingly industrialized world. He was also imagining it not just as the world out there, but also inside him, touching his life and sense of wonder as well as his suffering and death. His discontent with the world in which he lived was always a form of love.