In 2012, Jess Walter’s breakout bestseller, “Beautiful Ruins,” brought movieland hilariously and brilliantly to life. The story offered an enchanting vision of glamorous old wrecks — from Tinseltown to an Italian village to Richard Burton himself.

But now, with his new novel, “The Cold Millions,” Walter attempts to bring that same verve to the pitiless realm of Spokane, Wash., in 1909. Where once he satirized the meretricious appeal of Hollywood, movie stars and reality TV, here he’s hunkered down with homeless workers, railway tramps and union organizers.

The result should be an earnest historical novel about the brutal struggle for fair wages, but through the alchemy of Walter’s voice, “The Cold Millions” is a work of irresistible characters, harrowing adventures and rip-roaring fun. In a country of amnesiacs that observes Labor Day with all the energy of a repressed yawn, this story is a rousing celebration of the forgotten heroes who devoted their lives and shed their blood to ensure the dignity of American work.

Walter structures “The Cold Millions” as a concoction of tales swirling around the violent repression of laborers in the early 20th century. With Spokane doubling in size every six years, the city “felt like the intersection of Frontier and Civilized,” he writes, “the final gasp of a thing before it turned into something else.” In this effervescent novel, he captures that transition in the experiences of people swept along by it. Freely mixing real and fictional characters in the tradition of E.L. Doctorow, Walter takes us back to a period of rising xenophobia, when moneyed interests whipped up alarm about “filthy foreigners,” godless socialists, union organizers and other boogeymen who still trouble the cashmere dreams of American capitalists.

At the center of this thrilling battle are 16-year-old Rye Dolan and his older brother, Gig, two of the most likable characters you’ll ever meet. Orphaned and penniless, Rye and Gig are trudging along with thousands of other men — just a sliver of “the cold millions” — who are repeatedly lured into dangerous jobs, swindled out of their wages and then driven off by club-wielding thugs.

Walter presents Gig as a charming idealist so handsome he turns heads on the street. He may have no formal education, but he’s made the most of studying volumes 1 and 3 of “War and Peace,” and he knows with all his heart that “labor ought to share in the wealth it produces.” Fed up with a country in which “a rich handful lived in the clouds while the rest starved and slaved,” Gig has signed on with the Industrial Workers of the World — the Wobblies — a big-tent union that welcomes everybody. His younger brother, Rye, doesn’t feel the same enthusiasm for the cause, but he idolizes Gig and follows him to a free speech rally that gets them both beaten and arrested. That misery quickly leads to even more hazardous ordeals.

The historical foundation of “The Cold Millions” offers a grim lesson in the endless struggle for better working conditions. A conspiracy of mine owners, unsympathetic judges and conservative newspaper editors fans the flames of anti-union paranoia. (It’s sobering to be reminded that the Internet did not invent viral disinformation.) With laborers divided and on the run, anyone who makes trouble is fired, and anyone who doesn’t have a job is labeled a vagrant, vulnerable to incarceration in an over-packed, underground prison that’s more like a medieval dungeon. And wild as Spokane feels in 1909, Walter also takes us on side trips to wretched, lawless towns deep in the Northwestern forests that seem like places in the 16th century.

Walter’s greatest real-life find among the forgotten annals of this era is a union firebrand named Elizabeth Gurley Flynn. Celebrated as the “East Side Joan of Arc” and condemned as the “she-dog of anarchy,” Gurley burns through these pages like an avenging angel. By the time she arrives in Spokane, she’s already what Walter calls “a grizzled veteran of dozens of union actions.”

Oh — and she’s a pregnant 19-year-old!

If the mine owners think they can smother the workers’ free speech protests in Spokane, they’ve got another thing coming. Fearless and indefatigable, Gurley shouts down policemen sent to arrest her, mocks judges set to sentence her and even shames a bar full of drunks ready to kill her. She’s a town-square rally and a newspaper staff compressed into a single body of implacable righteousness. (A decade after the events of this novel, Gurley helped found the ACLU.) But even Spokane’s union leaders aren’t sure they should allow a pregnant woman — unaccompanied by her husband! — to speak in the streets. She instantly puts them in their place: “With all due respect,” she says with a laugh, “I have given speeches from Maine to Montana, and I have never once been allowed to speak.”

Rye is spellbound by this formidable young woman, and you will be, too. If I weren’t already a member of the Washington-Baltimore News Guild, I’d sign up on the spot.

But Rye’s older brother, Gig, has his eye set on Ursula the Great, a striptease artist who sings in a cage with a ravenous cougar. (Her secret? Beef liver sewn into the corset. Do not try this at home.) Yes, it’s that sort of novel, bursting with a dazzling range of outrageous characters — including a double-crossing anarchist, a millionaire with a vast network of spies and a matter-of-fact assassin who would rather not kill members of the fairer sex, but with “half the world being women, you can’t avoid it.”

“Nothing here is as it seems,” Gurley warns, and she might as well be speaking directly to the reader. “The sharks, mines, flops, brothels, taverns, cops — it’s all one fabric.” In fact, it’s more of a spider’s web, and there’s no guarantee our young heroes will escape alive. The only guarantee is that Walter’s new tragicomedy about this moment of American history is one of the most captivating novels of the year.

Ron Charles writes about books for The Washington Post and hosts

The Cold Millions

By Jess Walter

Harper. 342 pp. $28.99