The graceful, incisive writing lifts “The Beast” from being merely an impressive feat of reportage into the realm of literature. Mr. Martínez has produced something that is an honorable successor to enduring works like George Orwell’s “The Road to Wigan Pier” or Jacob Riis’s “How the Other Half Lives.”

Mr. Martínez is not the first to write about the migrant trail. Ted Conover’s excellent “Coyotes: A Journey Across Borders With America’s Illegal Migrants” was published in 1987, and feature films like “Tres Veces Mojado” and “Sin Nombre” have also tried to portray the drama and tragedy of smuggling humans. But as Mr. Martínez makes graphically clear, the whole system has become markedly more brutal, corrupt and dangerous: These days it’s “everyone against everyone, migrants caught in the middle.”

In the second half of the book he focuses on the United States-Mexican border, a subject that has been written about exhaustively. But even in a place like Ciudad Juárez, across the Rio Grande from El Paso, Tex., he finds something new to report. He writes with compassion about deportees, some of whom “hardly speak Spanish” after growing up in the United States, and how they become prey to the touts and currency exchange dealers as the migrants step into Mexican territory, “disoriented, with a plastic bag in hand that holds a copy of the papers ordering them out of the country.”

“I can tell that for a few of them, it’s hard to take those first few steps away from the Santa Fe Bridge,” he writes. “They stare into the distance, into their home country,” the United States, forced to “use Spanglish to ask how to reach their hometown, which they may hardly remember. Some have no family in Mexico at all.”

Though Mr. Martínez seeks a broad historical view, his book may also be useful in our current immigration debate, if only because it puts the lie to characterizations of undocumented immigrants as having “calves the size of cantaloupes because they’re hauling 75 pounds of marijuana across the desert,” as Representative Steve King, Republican of Iowa, has put it. As Mr. Martínez shows, the situation is one of “narcos and migrants vying for the same spaces,” an unequal struggle if ever there was one.

“What gets the narcos angry is that migrants attract enough attention to force authorities to look like they’re doing something,” Mr. Martínez explains. When the Mexican drug smugglers grow “sick of migrants heating up their turf,” they don’t hesitate to kill entire groups of Central American intruders, or kidnap them and hold them for ransom.

“Migrants don’t just die, they’re not just maimed or shot or hacked to death,” Mr. Martínez writes. “The scars of their journey don’t only mark their bodies, they run deeper than that. Living in such fear leaves something inside them, a trace and a swelling that grabs hold of their thoughts and cycles through their head.” By capturing that grim reality, and in such gripping prose and detail, Mr. Martínez has both distinguished himself and done us all a vital public service.