Llewyn Davis is having a bad few days, even a bad week. Or maybe just one very bad night. As “Inside Llewyn Davis” opens, the title character, a folk singer in Greenwich Village, holds a Gaslight Cafe audience spellbound with a hushed, perfectly studied rendition of the traditional tune “Hang Me, Oh Hang Me.” The year is 1961, when the Village folk scene was on the verge of transforming from a hermetic community of purists to a tourist destination where dilettantes could gawk at commodified Beats and their “new ethnic” successors. The adamantly uncommercial Llewyn is having none of it, preferring the scuffed patina of unassailable — and impoverished — artistic purity.

As embodied by the gifted actor and singer Oscar Isaac in a poignant, mesmerizing breakout performance, Llewyn emerges as an improbably sympathetic anti-hero in “Inside Llewyn Davis,” written and directed by Joel and Ethan Coen in a tender, startlingly straight-faced departure from their established house style of cool, ironic distance. Not that they’ve entirely abandoned their signature sharp edges and jokes confected like cookies full of arsenic: “Inside Llewyn Davis” is full of lacerating, often profane speechifying, much of it darkly funny and most of it directed at the long-suffering, compulsively self-sabotaging Llewyn, who sourly returns the verbal abuse in kind.

That bitterness notwithstanding, an unmistakably forgiving, even wistful air pervades “Inside Llewyn Davis” that feels new to the Coen canon, an abiding compassion that elevates their protagonist from an object of derisive pity to an avatar — not just of his own era, but of ours. Like so many of the characters in movies this year — from Bruce Dern’s bereft retiree in “Nebraska” to Tom Hanks’s “Captain Phillips” and Robert Redford’s nameless sailor in “All Is Lost” — Llewyn Davis can see that his era is passing, threatening to make him a casualty in its inexorable wake. He’s smart enough to see that the times are a-changin’. He’s self-aware enough to know that he won’t be changing with them.

But for the few days depicted in “Inside Llewyn Davis,” he at least struggles, if not always valiantly. In a series of encounters with family, friends, ex-lovers, fellow musicians and impresarios, Llewyn — who is loosely based on the late folk singer Dave Van Ronk — is put through a classic test of character, with every impulsive choice sealing his ultimate fate. Navigating an archipelago of narrow corridors and fusty downtown couches, Llewyn argues with a sometime friend, Jean (Carey Mulligan), who with her husband, Jim (Justin Timberlake), is part of a wholesome folkie duo; he sits in on a session for a tacky novelty record called “Please Mr. Kennedy”; he alienates well-meaning Upper West Side supporters and early-music fans. He cadges a ride to Chicago, where he hopes to audition for club owner and manager Bud Grossman, tone-perfectly portrayed by F. Murray Abraham, whose pronouncement “I don’t see a lot of money here” reverberates in his empty club like the clang of a descending guillotine.

That road trip west could have been scripted by Jack Kerouac himself, Llewyn’s car mates consisting of a self-important jazz musician and pompous pontificator, played with suitably wheezy grandiosity by John Goodman, and a vaguely Neal Cassady-esque driver played by Garrett Hedlund, who conveniently played Cassady in “On the Road” just last year. (Real-life folk figures Tom Paxton, the Clancy Brothers and Peter, Paul and Mary are evoked even more explicitly in the Coens’ script.)

Throughout the journey, Llewyn keeps playing, with Isaac lending his assured, clear voice to such folk standards as “Fare Thee Well (Dink’s Song)” and “The Death of Queen Jane,” often in their gratifying entirety. (The music was arranged and produced by T Bone Burnett.) As diverting as Llewyn’s travels are, and as revelatory his encounters with the eccentrics and charismatic oddballs (we haven’t even mentioned the cat yet), it’s pure sensory pleasure that vaults “Inside Llewyn Davis” into the pantheon of great Coen Brothers movies, from Bruno Delbonnel’s wintry, desaturated cinematography to the music that rings with high, lonesome longing and regret.

Fans of the filmmakers will note that “Inside Llewyn Davis” shares more than a little form and substance with “O Brother, Where Art Thou?,” their paean to old-time music and another classical odyssey re-cast as sepia-toned period piece. And like their best work, “Inside Llewyn Davis” lends itself to near-endless exegesis and interpretation, from its atmospheric excavation of the insular, occasionally overlapping worlds of 1960s New York to authenticity as both fetish and Olympian ideal.

Of course, it’s the willingness to embrace artifice in the name of authenticity that marks a true star. In many ways, “Inside Llewyn Davis” plays like a waking nightmare of creeping anxiety and dread, as the era’s grandmaster of brazen self-invention arrives unseen in New York while Llewyn’s self-defeating near-misses pile up like so much street-sullied snow. But this soulful, unabashedly lyrical film is best enjoyed by sinking into it like a sweet, sad dream. When you wake up, a mythical place and time will have disappeared forever. But you’ll know that attention — briefly, beautifully — has been paid.

★ ★ ★ ★

R. At area theaters. Contains profanity, including some sexual references. 104 minutes.