A decade before the Civil War, the leading Southern periodical De Bow’s Review published a series titled Diseases and Peculiarities of the Negro Race—a much-needed study, the editors opined, given its “direct and practical bearing” upon 3 million people whose value as property totaled some $2 billion. The essays’ author, the distinguished New Orleans physician Samuel Adolphus Cartwright, described in precise anatomical terms the reasons for African Americans’ supposed laziness (“deficiency of red blood in the pulmonary and ar­terial systems”), love of dancing (“profuse distribution of nervous matter to the stomach, liver and genital organs”), and exceptional dislike of being whipped (“skin … as sensitive, when they are in perfect health, as that of children”).

But what drew readers’ particular attention was Cartwright’s discovery of a previously unknown medical condition that he called “Drapetomania, or the disease causing Negroes to run away.” (He derived the name from an ancient Greek term for a fugitive slave.) This affliction, he continued, had two effective cures: treating one’s slaves kindly but firmly, or, failing that, “whipping the devil out of them.”

Drapetomania seemed on the verge of becoming a fatal contagion in the summer of 1851, when Cartwright’s articles appeared. Although only a few thousand people, at most, escaped slavery each year—nearly all from states bordering the free North—their flight appeared to many Southern whites the harbinger of a larger catastrophe. The Mason-Dixon Line had become slavery’s fraying hem. How long before the entire fabric began to unravel?

Worst of all, the exodus could no longer be blamed on scattered outbreaks of Drapetomania. Rather, an organized network, vast and sinister, actively encouraged and abetted it. And increasingly, this movement operated not under cover of darkness but in broad daylight.

For most people today—as for most Americans in the 1840s and 1850s—the phrase Underground Railroad conjures images of trapdoors, flickering lanterns, and moonlit pathways through the woods. The century and a half since its heyday has only deepened the mystery. For a saga that looms so large in the national memory, it has received surprisingly little attention from scholars, at least until recently. What’s more, the existing literature sometimes seems to obscure the real story still further. Was the Underground Railroad truly a nationwide conspiracy with “conductors,” “agents,” and “depots,” or did popular imagination simply construct this figment out of a series of ad hoc, un­connected escapes? Were its principal heroes brave Southern blacks, or sympathetic Northern whites? The answers depend on which historians you believe.

Even the participants’ testimonies often contra­dict one another. A generation after the Civil War, one historian (white) interviewed surviving abolitionists (most of them white) and described a “great and intricate network” of agents, 3,211 of whom he identified by name (nearly all of them white). African Americans told a different story. “I escaped without the aid … of any human being,” the activist minister James W. C. Pennington wrote in 1855. “Like a man, I have emancipated myself.”

The Underground Railroad often was not hidden at all.

Now Eric Foner, one of the nation’s most admired practitioners of history—his previous book, on Abraham Lincoln and slavery, won a Pulitzer Prize—joins an increasing number of scholars shining lanterns into the darkness. Several years ago, an undergraduate in Foner’s department at Columbia, at work on her senior thesis, discovered the previously overlooked journal of a white New Yorker who aided hundreds of escaping slaves in the 1850s—a find that inspired his latest book. (The student, he takes pains to mention in his acknowledgments, decided to become a lawyer, so no scholarly careers were harmed in the production of this volume.)

Gateway to Freedom: The Hidden History of the Underground Railroad tells a story that will surprise most readers. Among its biggest surprises is that, despite the book’s subtitle, the Underground Railroad often was not hidden at all. Abolitionist groups made little secret of assisting runaways—in fact, they trumpeted it in pamphlets, periodicals, and annual reports. In 1850, the year of the notorious Fugitive Slave Act, the New York State Vigilance Committee publicly proclaimed its mission to “receive, with open arms, the panting fugitive.” A former slave in Syracuse, Jermain W. Loguen, announced himself in the local press as the city’s “agent and keeper of the Underground Railroad Depot” and held “donation parties” to raise money, while newspapers published statistics on the number of fugitives he helped.

Underground Railroad bake sales, as improbable as these may sound, became common fund-raisers in Northern towns and cities, and bazaars with the slogan “Buy for the sake of the slave” offered donated luxury goods and handmade knickknacks before the winter holidays. “Indeed,” Foner writes, “abolitionists helped to establish the practice of a Christmas ‘shopping season’ when people exchanged presents bought at commercial venues.” For thousands of women, such events also turned ordinary, “feminine” chores like baking, shopping, and sewing into thrilling acts of moral commitment and political defiance.

Even politicians who had sworn oaths to uphold the Constitution—including its clause mandating the return of runaways to their rightful masters—flagrantly ignored their duty. William Seward openly encouraged Underground Railroad activity while governor of New York and (not so openly) sheltered runaways in his basement while serving in the U.S. Senate. Judge William Jay, a son of the first chief justice of the United States Supreme Court, resolved to disregard fugitive-slave laws, and donated money to help escapees.

Eventually, such defiance gained legal standing, as Northern states passed “personal liberty” acts in the 1850s to exempt state and local officials from federal fugitive-slave laws. It is a little-known historical irony that right up until the eve of Southern secession in 1860, states’ rights were invoked as often by Northern abolitionists as by Southern slaveholders.

Foner’s compelling narrative centers on New York City, another un­expected twist. Unlike Boston and Philadelphia, with their deep-rooted reformist traditions—­and unlike such upstate cities as Buffalo and Syracuse—the metropolis was hardly known for abolitionist fervor. Slaves had worked its out­lying farms within living memory; as late as the 1790s, they made up 40 percent of Brooklyn’s population. By the time New York’s last bondsmen were freed, in 1827, its economy was thoroughly entwined with the South’s; the editor of De Bow’s gloated just before the Civil War that the city was “almost as dependent upon Southern slavery as Charleston.” New York banks financed planters’ slave purchases; New York merchants grew rich on slave-grown cotton and sugar. Slave catchers prowled Manhattan, and besides lawfully re­capturing escapees, they often illegally kidnapped free blacks—­especially children—to be sold into Southern bondage.

Yet in New York, runaways contested their freedom aboveground, in courtrooms and in the streets. In 1846, a man named George Kirk stowed away on a ship from Savannah to New York, only to be found by the captain and placed in shackles, awaiting return to his master. After the ship docked, black stevedores heard his cries for help and alerted abolitionist leaders, who managed to get a sympathetic judge to rule that Kirk could not be held against his will. The victorious fugitive left court surrounded by a vigilant phalanx of local African Americans. Soon, however, the mayor ordered police to arrest Kirk, and after an unsuccessful attempt by abolitionists to smuggle him away (inside a crate marked American Bible Society), he was hauled back into court. The same judge now found different legal grounds on which to release Kirk, who this time rolled off triumphantly in a carriage and soon reached the safety of Boston.

Kirk’s protectors included an unlikely pair of activists. Sydney Howard Gay, the editor of the National Anti-Slavery Standard, descended from Puritan luminaries and had married a rich (and radical) Quaker heiress. Louis Napoleon, his co-conspirator, is believed to have been the freeborn son of a Jewish New Yorker and an African American slave; he worked as a porter in Gay’s office. While Gay published abolitionist manifestos and raised money, Napoleon prowled the New York docks in search of black stowaways and crisscrossed the Mason-Dixon Line guiding escapees to freedom.

It was Gay who, in 1855 and ’56, kept the “Record of Fugitives” that the undergraduate found in Columbia University’s archives, chronicling more than 200 escapes. This document, Foner writes, “is the most detailed account in existence of how the underground railroad operated in New York City … a treasure trove of riveting stories and a repository of insights into both slavery and the underground railroad.” Perhaps most poignant, Gay matter-of-factly recorded the slaves’ descriptions of their motives for escape. Apparently none mentioned Drapetomania, Dr. Cartwright’s theory notwithstanding. “One meal a day for 8 years,” begins one first-person account. “Sold 3 times and threten to be sold the fourth … Struck 4 hundred lashes by overseer choped cross the head with a hatchet and bled 3 days.”

Ultimately, Foner demonstrates that the term Underground Railroad has been a limiting, if not misleading, metaphor. Certainly a nationwide network existed, its operations often covered in secrecy. Yet its tracks ran not just through twisting tunnels but also on sunlit straightaways. Its routes and timetables constantly shifted.

The Underground Railroad did, in a sense, have conductors and stationmasters, but the vast majority of its personnel helped in ways too various for such neat comparisons. As with Gay and Napoleon’s partnership, its operations often brought together rich and poor, black and white, in a common cause. Nearly as diverse were its passengers and their stories. One light-skinned man decamped to Savannah, put himself up in a first-class hotel, strolled about town in a fine new suit of clothes, and insouciantly bought a steamship ticket to New York. A Virginia woman and her young daughter, meanwhile, spent five months crouching in a tiny hiding place beneath a house near Norfolk before being smuggled to freedom.

Even on the brink of the Civil War, the number of such fugitives remained relatively small. Yet the Underground Railroad’s influence far outstripped the scale of its operations. Besides helping to precipitate the political crisis of the 1850s, it primed millions of sympathetic white Northerners to join a noble fight against Southern slave­holders—­whether they had personally aided fugitives, shopped at abolitionist bake sales, or simply thrilled to the colorful accounts of slave escapes in books and newspapers. It fueled Southern leaders’ paranoia, while forcing Northern leaders to take sides with either the slaves or the slave catchers.

Above all, it prepared millions of enslaved Americans to seize freedom at a moment’s notice. Just days after the Confederate attack on Fort Sumter in April 1861, escapees were reported to be streaming northward at an unprecedented rate. Within a few months, countless Union soldiers and sailors effectively became Underground Railroad agents in the heart of the South, harboring fugitives who flocked in huge numbers to the Yankees’ encampments. This was Drapetomania on a scale more awful than Dr. Cartwright’s worst fantasies.

Samuel Cartwright died in 1863, a few months after the Emancipation Proclamation, which had effectively made Drapetomania federal policy. That year, an abolitionist observed that all of the Union’s railway lines were enjoying record wartime traffic—­except one. The Underground Railroad, he wrote, “now does scarcely any business at all … Scarcely a solitary traveler comes along.”

And in early 1864, New Yorkers may have been startled to open The Evening Post and see a headline announcing plans for “A New Underground Railroad” in the city. The accompanying article quickly set their minds at rest, however. It described a scheme to build Manhattan’s first subway line, running northward up Broadway from the Battery to Central Park.