BERLIN — “I’m not asking for an opera here,” the notorious criminal Macheath says at his wedding, early in a work that happens to be called “Die Dreigroschenoper” (“The Threepenny Opera”).

And in Barrie Kosky’s hauntingly enjoyable new production of Kurt Weill and Bertolt Brecht’s famous “play with music” for the Berliner Ensemble — at the theater where it premiered in 1928 — Macheath then reaches into the orchestra pit in search of nuptial entertainment and steals the “Threepenny” score from the conductor’s stand. He flips through the pages while humming the show’s big hit, “Mack the Knife,” tears them up and throws the scraps into a metal bucket. Then he lights them on fire.

The line “I’m not asking for an opera here” dates back to the ’20s, but Weill and Brecht never wrote what follows — nor did their essential collaborator Elisabeth Hauptmann, who with this production is finally getting proper billing alongside them after decades of neglect. Yet this kind of ironic gesture toward the art form wouldn’t be out of character for them; coming from Kosky, it’s a subtle tribute, and a blazing declaration of independence.

It’s a moment, along with many others in Kosky’s production that epitomizes the adage of knowing rules in order to break them.

Kosky clearly understands the work: the social critiques that course through Brecht and Hauptmann’s crass text; the ways in which Weill’s earworm score lodges those ideas in your mind; and how, in its tension between words and music, “Threepenny” dares you to connect with it emotionally amid constant reminders of theatrical artifice.

He also seems to know that “Threepenny” is ultimately a problem piece. It may be the defining artwork of Weimar-era Berlin, but more often than not it makes for a joyless night at the theater. Its dizzying layers of satire and style tend to overwhelm directors, who as if operating with a Wikipedia understanding easily succumb to visual clichés, vicious affect and didacticism. The worst productions aspire to the sexily somber Berlin of Sam Mendes’s take on the musical “Cabaret.”

But “Threepenny” isn’t, as Kosky said in an interview with The New York Times, “‘Cabaret’ with a little bit of intellectualism.” Indeed, it was quintessentially 1920s Berlin — a timely tale, despite its setting of London’s criminal underworld in the 19th century, that became a pop culture phenomenon known as “Threepenny fever” — but its legacy is far richer and more widespread than that. Especially after the 1950s, once the show found belated success in the United States with a long-running adaptation by the composer Marc Blitzstein.

Covers of “Mack the Knife” abounded, and made for one of Ella Fitzgerald’s greatest live recordings; Brecht’s poetic lyrics influenced Bob Dylan; the artist Nan Goldin named her photography collection “The Ballad of Sexual Dependency” after one of the show’s songs. And the metatheatrical devices of “Threepenny” are alive and well: In Leos Carax’s new film, “Annette,” emotion and artifice fit snugly together in a deliberate tension you could trace back to Brecht and Weill.

Even so, the vitality of “Threepenny” depends on intervention and adaptation; it can never be performed, as it too often has been, as a museum piece. And Kosky never treats it as one. Instead he adds and subtracts, breathing new life into a work that desperately needed it. He sheds the excesses of Act I and eliminates entire characters, for example, to reveal a recognizable but freshly presented story focused on that most fundamental of human dramas: love.

Capitalism, and Brecht’s scathing indictment of it, still loom over the show — but more obliquely, as an insidious force behind relationships that renders them slippery and unreliable. In Kosky’s view, it also feeds and thwarts Macheath’s pathological need to be loved, whether by his fellow characters or the members of the audience.

Macheath, a.k.a. Mack the Knife — performed by Nico Holonics with unflappable joy but a weariness that betrays the darkness behind his carefree demeanor — is not a man to give up his habits, as he is described in the show. He gives away wedding rings as if they were pennies, and smiles as he watches women fight over him. Like Don Giovanni, he never loses faith in his ability to manipulate them, even as they abandon him one by one.

He is introduced, as ever, with “Mack the Knife” (following the overture, here lithe yet lyrical in chorale-like passages, conducted by Adam Benzwi). Through a curtain of black tinsel, a sparkling face appears — that of Josefin Platt as the Moon Over Soho, a role created for Kosky’s production — to sing the murder ballad with the rapid vibrato of Lotte Lenya, Weill’s wife and a legendary interpreter of his music.

In general, Kosky seems to have more of an affinity for Weill’s music, which he expands with relish, than the text. Where he truly defers to Brecht — his production, after all, is for Brecht’s company — is in the staging, which shatters the fourth wall from the start and continually reminds its audience, in anti-Wagnerian fashion, that what they are seeing isn’t real.

Polly Peachum, here a commanding Cynthia Micas, calls for her own spotlight and gestures for the curtain to be raised, revealing a jungle gym of a set (by Rebecca Ringst) that is more dynamic than it at first appears; Jonathan Jeremiah Peachum (the darkly charming Tilo Nest), Polly’s father and Macheath’s underworld rival, cues the orchestra; stagehands make no effort to hide their work.

The effect, in Brecht’s school of theater, is to temper the audience’s emotional response and trigger an intellectual one — which is crucial to the political success of “Threepenny,” yet is often difficult to reconcile with the seductive grip of Weill’s music. That can get messy, but Kosky’s production comfortably has it both ways; the result may not please purists of Brecht or Weill, but on balance it makes for persuasive, satisfying drama.

And by homing in on Macheath, Kosky allows room for psychological richness, particularly with the women in his orbit: Polly; her mother, Celia Peachum (lent the authority of a power broker by Constanze Becker); Jenny (arguably the soul of the show, wistful and bitter as sung by Bettina Hoppe); and Lucy Brown (Laura Balzer, a master of physical and musical comedy). You could also count among them Lucy’s father, the police chief Tiger Brown, here performed by Kathrin Wehlisch in drag — not a gimmick, but a homoerotic treatment of Macheath’s oldest friendship as yet another fragile romance.

All these relationships fail — usually because of money, in some way. But Macheath is undeterred, by the end looking for his next connection as a brightly lit sign descends from the rafters: “LOVE ME.” That’s another Brechtian touch, a modern take on the projections used in Caspar Neher’s set for the original 1928 production.

But what follows is all Kosky. After the winkingly jubilant finale, the Moon Over Soho shows its face again, bleakly sending off the audience with a “Mack the Knife” verse, written by Brecht in 1930, that says some people are in the dark, and some are in the light; and while you can see those in the light, you’ll never see the ones in the dark.

Die Dreigroschenoper

Through Sept. 4, then in repertory, at the Berliner Ensemble, Berlin;