I’m not crazy about the jukebox musical as a genre. But, you know, sometimes it depends what’s on the jukebox.

Take “Million Dollar Quartet,’’ which has arrived in Boston for a run that ends Oct. 20. It has all the weaknesses of the genre: a wafer-thin story line, minimal-to-nonexistent character development, stilted dialogue that acts as little more than an expository bridge to the next song. Essentially, it’s a concert masquerading as a musical.

But under the direction of Eric Schaeffer, who helmed the excellent 2011 revival of “Follies’’ on Broadway, “Million Dollar Quartet’’ steadily wears down — or blasts through — your resistance by tapping into the rude, raw energy of early rock ’n’ roll.

Yes, you’ve heard most of these songs a million times before, but the show reminds you why they became classics in the first place. So what you initially fear is going to be a warmed-over oldies act that trades only on musty nostalgia — rather like those painful reunion performances that periodically crop up on PBS — turns out instead to be an unexpected treat.

“Million Dollar Quartet,’’ which premiered on Broadway three years ago, directed by Schaeffer, is inspired by a real-life 1956 jam session in the Memphis studio of Sun Records that featured Elvis Presley, Carl Perkins, Jerry Lee Lewis, and Johnny Cash. Quite a galaxy is gathered in the red-tiled studio (designed by Derek McLane) overseen by Sam Phillips, played by Vince Nappo.

More coverage

The plot, such as it is, largely revolves around Phillips’s attempt to get Cash to sign a three-year contract extension with Sun Records, not knowing that the singer has already signed with Columbia Records. During brief flashback scenes, we see Phillips’s first meetings with the stars. The script is peppered with a few knowing jokes: Describing a recent, unsatisfying gig, Elvis declares: “I swear, I will never play Vegas again.’’

Given the limitations of the “Million Dollar Quartet’’ book by Colin Escott and Floyd Mutrux, the success or failure of any production rides on the talents of whoever plays that storied foursome. In that regard, this production benefits enormously from Maine native Scott Moreau, who portrays Johnny Cash. Performing “Folsom Prison Blues,’’ “Sixteen Tons,’’ “I Walk the Line’’ and “Ring of Fire,’’ Moreau channels the Man in Black and then some. He unleashes a voice that possesses not just Cash’s deep, rumbling, sepulchral timbre but also an astonishing power. This guy seems like he could knock down a brick wall just by singing at it. In the nonmusical moments, Moreau captures Cash’s solitary quality, the way he had of seeming to lose himself in an interior world.

Another standout is James Barry, who brings a twitchy edge to his portrayal of Carl Perkins. The last time I saw Barry, he was trapped in the airless precincts of “Arms on Fire,’’ Steven Sater’s snoozy angst-fest, at Chester Theatre Company. In “Million Dollar Quartet,’’ Barry has a more straightforward case of dissatisfaction to play. He growls compellingly through “Who Do You Love?’’ early in the show, and that’s roughly the question bedeviling Perkins: He is fearful of professional eclipse, seething at the fact that Elvis, not him, got to perform Perkins’s “Blue Suede Shoes’’ on “The Ed Sullivan Show.’’

Perkins clashes frequently with Jerry Lee Lewis, played by John Countryman. Jerry Lee is one of the all-time stranger-than-fiction characters, but there’s not enough volcanic wildness in Countryman’s performance, scant whiff of true danger. His Jerry Lee comes across as merely mischievous: Andy Hardy as piano man. Nor does Tyler Hunter project enough commanding charisma as Elvis. Hunter has the hip-swiveling down pat, but seldom does he move beyond mannerism to seem like the living, breathing embodiment of the King.

Still, they amp up the voltage to impressive levels on tunes like “Long Tall Sally’’ and “Hound Dog’’ (Hunter), and “Great Balls of Fire’’ and “Whole Lotta Shakin’ Goin’ On’’ (Countryman). Playing Elvis’s girlfriend, here called Dyanne, Kelly Lamont generates plenty of steam heat in her performance of “Fever,’’ and also leads a rousing version of “I Hear You Knocking.’’

Flaws and all, “Million Dollar Quartet’’ manages to deliver on one of the promises that’s always been at the heart of rock ’n’ roll, something that shouldn’t be taken for granted: the simple pleasures of a good time.