Wright's fifth feature is a fast-paced ride with the year's best soundtrack.

Like every Edgar Wright movie since “Shaun of the Dead,” the director’s fifth feature, “Baby Driver,” takes a ludicrous concept and turns it into a brilliant exercise in high style and a rush of big ideas. The director’s most ambitious work to date is a wildly successful romantic heist comedy, propelled from scene to scene with a lively soundtrack that elevates its slick chase scenes into a realm that develops its own satisfying beat.

If Busby Berkeley made “Grand Theft Auto,” it might look something like this exuberant comic caper, in which young getaway driver Baby (Ansel Elgort) speeds through highways and back alleys seemingly impervious to police advances so long as he has a smooth beat to guide his maneuvers. Operating under the employ of robbery maestro Doc (a stern Kevin Spacey), Baby quietly works off a debt to his boss by hauling two-bit criminals out of harm’s way, while caring for his deaf surrogate father (CJ Jones) on the side. Early on, Wright establishes the rhythms governing Baby’s world, as he blasts The Jon Spencer Blues Explosion’s “Bellbottoms” while accelerating through town. A man of few words, he’s haunted by an accident in his childhood that leaves a ringing in his ears, and he fills the invasive hum with more agreeable sounds. The movie hovers within the confines of his ubiquitous playlist, and generates immediate suspense whenever it goes away.

Baby needs his melodies for practical reasons, but they’re also key to his identity, a hodgepodge of classic masculine archetypes. Elgort has the muted ferocity of a latter-day James Dean, but glides down the sidewalk and slides across the scenery like an outlaw Fred Astaire. He thinks in terms of beats even when they’re invisible to everyone else, secretly recording the vulgar banter of his criminal peers and looping the audio to make his own funky remixes. Zipping around town as headphones dangle from his ears, Baby would be a blast to watch even if the movie relegated him to a supporting role. Fortunately, he dominates almost every scene.

Like a lot of well-meaning movie criminals, Baby wants to flee the life of crime, but needs the money so badly that he’s trapped in his perilous routine. His purity regularly vexes the scowling bad guys he carts around, including crazy-eyed killer Bats (Jamie Foxx), smarmy Buddy (Jon Hamm), and Buddy’s leering girlfriend, Darling (Eiza Gonzalez). All of these demented antagonists are exaggerated cartoons on par with their names, but that sits well with the way Baby views them. Fortunately, he finds respite in a tentative romantic connection with good-natured waitress Deborah (Lily James), a character who’s somewhat underdeveloped but gels nicely with Baby’s mounting desire to find a purpose beyond his risky profession.

The stakes pile up when Baby’s pulled into one last job and plots his escape, leading to a series of increasingly messy encounters as his speed-demon skills kick into overdrive. It’s safe to say that nothing in the entire “Fast and the Furious” franchise can match the show-stopping sequences in which Baby barrels full-throttle from one outrageous set piece to the next, with Wright’s typical rapid-fire editing providing a natural complement to the incessant music that surrounds Baby at every turn. His artists include Lionel Ritchie, Isaac Hayes, and Queen, and “Baby Driver” has more than the year’s best soundtrack: It shapes the story.

While this film was inspired by a music video for Mint Royale that Wright directed nearly 15 years ago, the movie doesn’t simply careen from one song to the next; instead, it wields them as a narrative device. It’s easy to see why this large-scale project took so long for Wright to bring to fruition — with cadences that are hard to imagine on the written page, “Baby Driver” finds its form in the elegant, rapid-fire synthesis of movement and sound.

But “Baby Driver” is hardly a fetishistic display of shiny cars and beautiful people — we have “Drive” for that — instead rooting its fancy surfaces in legitimate emotions and the recklessness they cause. Elgort comes into his own as a leading man, enlivening Baby with a series of cool poses that mask his insecurities and traumatic past. He’s ideally matched against the movie’s eventual chief villain, played by Jon Hamm in a psychopathic turn that frees him from his “Mad Men” baggage once and for all.

Wright’s such a sophisticated filmmaker that the energizing pace obscures some of the other caricatures that mar the supporting cast, and his dense epilogue speaks to the impulses of a filmmaker seemingly incapable of reaching a tidy finish. But “Baby Driver” never ceases to be an engaging variation on the action genre and a credible look at one man’s addiction to its dangerous allure. The final half hour, an extended series of showdowns that involves multiple crashing vehicles and bullets galore, ranks as some of the best filmmaking in Wright’s career, and that’s saying a lot for one of the greatest action showmen working today.

Wright’s first solo writing credit is a script littered with snark and self-awareness, with nuggets of the geekiness embedded in his work ever since his “Spaced” days (“Don’t feed me any more lines from ‘Monsters Inc.’! It pisses me off!”). But “Baby Driver” primarily exists as a platform for those operatic chase scenes, and they’re expertly plotted to provide fulfilling results. Wright has described “Baby Driver” as “a car film driven by music,” but it’s more of a music film built around cars.

Five movies into his career, he continues to deliver an inspired kind of entertainment that follows its own rules — equal parts slapstick and visceral thrills, but never too far from a reality check when its characters must confront the legitimate hazards surrounding them.

But when Baby has to face the music, he does it in accordance with his own rulebook. Wright regularly cuts to a black-and-white fantasy that finds Baby imagining himself escaping the restrictions of his unfortunate conditions, as if acknowledging that even under these heightened circumstances he can’t get away with everything. Wright has never hesitated to deprive his audiences of a clean happy ending, and “Baby Driver” is no exception. But even as this ever-satisfying filmmaker reminds us that escapism has its limits, that doesn’t mean you can’t enjoy the ride.

Grade: A-

“Baby Driver” premiered at the 2017 SXSW Film Festival. It opens theatrically on August 11, 2017.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.