If you’re young, pretty and privileged, you have to work doubly hard to screw up your life. Just ask Nicole and Charlie, the gilded theatrical couple in Noah Baumbach’s Marriage Story. When we first meet them, they are lounging about their nice New York apartment, clearly in love and bathed in soft winter light. Then – boom – the pair are filing for divorce and can’t bear to even sit together on the subway back from work. What the hell are they doing? Neither one seems quite sure. It is almost as if this grisly split is yet another of their creative collaborations; their agonised, jagged remake of Kramer vs Kramer.

Marriage Story is Baumbach’s second film for Netflix, following The Meyerowitz Stories, and it is surely partly inspired (if that’s the right word) by his 2013 divorce from the actor Jennifer Jason Leigh. It has fine performances by Scarlett Johansson and Adam Driver, a family-pack of box-fresh dialogue and a keen sense of its own absurdity. Baumbach seeks to mine his material for laughs, no matter how desperate the situation becomes.

Once the divorce is in progress, it swiftly gathers pace. Nicole has taken their eight-year-old son to Los Angeles, and Charlie has to fight his ex-wife for custody. She has hired a lawyer (Laura Dern), which means that he’s got one, too – a rumpled legal warrior by the name of Bert Spitz (perfectly played by the great Alan Alda). Our antagonists perform complicated manoeuvres to better position themselves for the battle to come. Or as Bert puts it: “We have to prepare to go to court so as to avoid going to court.” It is at this point that Charlie first breaks down in tears.

Baumbach’s film is an ordeal – intentionally so – and it relies on its actors to pull the audience through. Playing Charlie, a feted director of avant-garde theatre, Driver starts out loose and rangy and then slowly stiffens and contracts, as if the legal back-and-forth has bent his very body out of shape. Johansson delivers brilliantly textured work as Nicole, a woman who longs to find her voice and strike out on her own but is never fully convinced that the ends justify the means. The film – meaning Baumbach – largely favours Charlie. But Johansson’s performance speaks up for Nicole.

Naturally, both lawyers think they can win the case. But anyone who’s had to ride on this particular rainbow can assure you there is no pot of gold to look forward to. Nicole and Charlie have come too far to back out. They must play it through to the bitter end, hapless prisoners of a system that rewards bad behaviour while penalising acts of kindness. They’ve done this to themselves, but we pity them all the same.

At one stage, feeling the strain, Charlie retreats to a back room to consult with Bert Spitz. The attorney is avuncular and garrulous and he duly embarks on a rambling, irrelevant gag about a woman who planned to vacation in Rome. Charlie listens in dismay and is finally moved to interrupt. “I’m sorry, Bert,” he says, “but am I paying for this joke?” And yes, of course that is what he’s doing; essentially Nicole is as well. The time keeps on ticking. The bill keeps running up. In the end, the joke is on them.

• Marriage Story is released on 6 November in the US and 15 November in the UK.

