When J.D. Vance was a boy, his beloved grandmother “Mamaw” told her boozer husband that if he ever came home drunk again, she’d kill him. When he did, and passed out on the couch, she got a gasoline can, poured fuel all over him and dropped a lit match on his chest. He survived with mild burns, and later quit drinking.

One time when J.D.’s mom took exception to something the boy said in the car, she hit the accelerator and sped up to 100 miles per hour, screaming that she was going to kill them both. When he jumped in the back seat hoping to protect himself from the impact, he recalls, she instead pulled the car over “to beat the s- -t out of me.” The evening concluded with Mom being hauled away in a police car.

One of J.D.’s stepdads, Bob, though kindhearted, had a bad case of “Mountain Dew mouth.” Half his teeth had fallen out, the other half were black, brown and misshapen.

J.D. and his people are called rednecks, white trash, hillbillies. But Vance made it out of the holler, way out. The Marines led him to Ohio State, then Yale Law School and finally a job as a principal at a Silicon Valley investment firm. Looking back on his youth, and all he fled, yields a frank, unsentimental, harrowing memoir, “Hillbilly Elegy.” It’s a superb book given an extra layer of importance by its political reverberations: When Vance returns home these days, he sees yard after yard festooned with Trump signs.

Nancy Pelosi says blue-collar white men vote “against their own economic interests” because of guns, gays and God, “God being the woman’s right to choose.” The Washington Post noted that this group does care about gun rights more than the average voter, but it’s a myth that their views on gays and God differ much from everyone else’s, and Pelosi’s regal dismissal of the bitter clingers is not only too reductive, it’s an attitude that drives voters away from the Democratic Party.

Though “Hillbilly Elegy” is about people, not politics, it is an eye-opening field guide to an unruly and hard-to-understand group, many of them born and bred Democrats, who could cost Hillary Clinton what looked like an easy election win. White voters without a college degree have favored Republicans for some time — they voted for Mitt Romney by 18 points in 2012 — but they love Donald Trump. In an average of six polls this month, he is beating Clinton by a margin of 58 to 30 among these voters. The massive swing of white working-class voters, who made up 44 percent of the electorate in 2012, could more than cancel out her strengths among minorities and the college-educated.

Vance paints a picture of a world exactly like the one Trump described in his acceptance speech 10 days ago. He grew up in Jackson, Ky., and nearby Middletown, Ohio, a once-prosperous industrial town where everyone seemed to work for the steel company Armco. Back in the 1960s, the company would actively recruit new workers from the hills of eastern Kentucky, taking care to preserve families by encouraging relatives to move in also. “For my grandparents,” Vance writes, “Armco was an economic savior — the engine that brought them from the hills of Kentucky to America’s middle class.” Vance’s Papaw would proudly stop by car dealerships to explain to J.D. that this or that car was built with Armco steel. He retired with a generous pension.

It is an eye-opening field guide to an unruly and hard-to-understand group, many of them born and bred Democrats.

After a 1989 merger with Kawasaki, the company became AK Steel. It still exists, but many factory jobs in Middletown disappeared. Real estate prices collapsed. Those who could afford to cut their losses left town; others were trapped in houses they couldn’t sell because they were worth less than what was owed on the mortgages. Downtown, prosperous shops turned into empty storefronts and poverty-exploiting businesses like cash-for-gold shops and payday lenders. Two local malls that were bustling as recently as the early 1990s are now dead, one of them turned into a parking lot. Crime and dread began to infect the night. “A street that was once the pride of Middletown today serves as a meeting spot for druggies and dealers,” Vance says.

Vance shuttled between the care of Mamaw and his mother, who burned through men and drugs. Once she was fired from her nursing job for rollerskating through the hospital, high on prescription meds she had stolen from the pharmacy. In a moment of panic, she once asked her son for a urine sample so she could pass a surprise whiz quiz as a condition of her job. He complied, feeling shamed and dirtied.

There are decaying post-industrial Middletowns all over the map. In 1970, Vance notes, 25 percent of white children lived in neighborhoods with poverty rates above 10 percent. By 2000 the figure had risen to 40 percent, and Vance believes it is higher today. The life expectancy for Vance’s people is declining.

Trump’s promises to stand up to the Chinese are resonating, as is his message that “the system is rigged” against a proud group of Americans, Americans who built the postwar glory but now feel they’re being ignored or outright mocked. White trash is the one ethnic group it is still OK to make fun of.

“Humans appear to have some need to look down on someone; there’s just a basic tribalistic impulse in all of us,” Vance recently told The American Conservative. “And if you’re an elite white professional, working-class whites are an easy target: You don’t have to feel guilty for being a racist or a xenophobe. By looking down on the hillbilly, you can get that high of self-righteousness and superiority without violating any of the moral norms of your own tribe.”

Mapping the politics of Vance’s clannish, resentful neighbors is challenging, even exasperating. Hillbillies pride themselves on distinguishing the deserving poor from the lazy moochers, but Vance points out that it’s a fuzzy line. His grandmother would lash out at the government for doing too much, then for doing too little. She’d ask why society could afford aircraft carriers but not enough drug-rehab centers. She’d complain that the rich weren’t paying their fair share. But she and J.D. would be just as angry at people who paid for T-bone steaks with food stamps and hated the idea of the government using Section 8 housing vouchers so that poor people could move in next door — poor people “like us,” Vance says. She’d say people wouldn’t have so many problems if they were forced to work for their benefit checks.

“I initially assumed that Mamaw was an unreformed simpleton,” says Vance, “and that as soon as she opened her mouth about policy or politics, I might as well close my own ears. Yet I quickly realized that in Mamaw’s contradictions lay great wisdom.”

Calling it wisdom seems like a stretch, but there does seem to be some continuity to the howl of desperation that echoes so chillingly through Vance’s book.

Manufacturing shed 5 million jobs after 2000, giving way to welfare, drugs and despondency. The number of Americans receiving welfare of one kind or another exploded from 42 million (or 18.8 percent of Americans) in 1983 to 109 million (or 35 percent) in 2012. As America added 83 million citizens, then, it added 67 million welfare recipients — during a period of massive wealth creation. (Per-capita income rose from about $30,000 in 1983 to over $52,000 in 2012.)

Hillbillies pride themselves on distinguishing the deserving poor from the lazy moochers, but Vance points out that it’s a fuzzy line.

The factory closings on the one hand and the welfare checks on the other created lots of idle people. And what do they do with all that spare time? Drugs. Government checks are easily laundered. (In Appalachia, a favorite trick is to buy cases of soda with food stamps and resell them for cash.)

Some Americans may unreservedly cheer the explosion in government largesse — aren’t we helping people more than ever before, and also doesn’t it create lots of solid middle-class jobs for administrators in the federal bureaucracy?

But Appalachians evidently have mixed feelings about it, sensing their growing dependency. They do want to turn back the clock, but not because they’re racist or afraid of modernity. They want to go back to having good-paying jobs. They want to go back to being proud of themselves and the things they produced. For years, they’ve essentially been told to sign up for welfare and shut up.

Vance said he noticed as a child that his peers seemed to fall into two groups: “My grandparents embodied one type: old-fashioned, quietly faithful, self-reliant, hardworking. My mother and, increasingly, the entire neighborhood embodied another: consumerist, isolated, angry, distrustful.”

What might the government do differently? Vance notes that hillbillies love to complain, a la Trump, that the system is holding them back. “Never be like those f—ing losers who think the deck is stacked against them,” Mamaw used to tell her grandson.

And yet hillbillies create so many varieties of misery for themselves. Vance recalls that in high school, a neighbor ran a bath, took some painkillers and passed out. When she awoke, the bath had overflowed and ruined the top floor of her house. “This is the reality of our community,” Vance writes. “It’s about a naked druggie destroying what little of value exists in her life. It’s about children who lose their toys and clothes to a mother’s addiction.”

The anger in hillbilly country is understandable. Vance grew up thinking it was perfectly normal for couples to have screaming matches that frequently turned violent. Neighbors would slide open the window to listen when the folks next door started going at it.

Trump’s attacks on the media and political correctness make Vance’s people stand up and cheer. From the Democrats, they draw the same sense of condescension that struck Vance when, at Yale, another student said she couldn’t believe he was in the Marines because he was a nice guy.

In hillbilly country, a code of honor runs so deep that if you casually call a man a son of a bitch, he’ll beat you senseless for the implied insult to his mother. But then you wouldn’t call the police because you figured you deserved to get a licking. Trump’s me-against-everybody combativeness, his refusal to back down, his vows to disrupt Washington deal-making are giving the hillbilly class a feeling they haven’t had in decades: that they’ve got a friend at the top.