In writer-director Lynne Ramsay's adaptation of "You Were Never Really Here," Joaquin Phoenix plays a wreck of a man, tracking and killing kidnappers of young girls sold into sex slavery.

In writer-director Lynne Ramsay's adaptation of "You Were Never Really Here," Joaquin Phoenix plays a wreck of a man, tracking and killing kidnappers of young girls sold into sex slavery. (Alison Cohen Rosa/A24)

When the Glasgow-born filmmaker Lynne Ramsay adapts a novel, she does what any responsive writer-director must. She listens to what speaks to her, personally, in the material, and creates colors, moods, images around a few key themes to support that selective interpretation.

In her previous drama, “We Need to Talk About Kevin,” metaphoric and literal blood splashed across scene after scene, from the smashed-tomato bacchanal of the prologue to the wounds inflicted by a scarily disaffected teenager in later scenes. Even the films of Ramsay’s that don’t quite work linger in the mind’s eye, years later. You remember the blood, because it’s not just blood; it’s a psychic distress signal.

“You Were Never Really Here” operates in similar ways. This time, though, Ramsay goes further into abstraction and fragmentary narrative, all for the better.

Joaquin Phoenix stars, so the possibilities for abstraction and fragmentation are in the air before anything actually happens. Ramsay works from Jonathan Ames’ 2013 novella, 95 pages of coolly delineated brutality. The main character, Joe, knows no peace, only pain. He’s a Marine now working for the FBI as tracker and rescuer of teenage and pre-teenage girls abducted into sex slavery. Joe’s childhood was scarred by horrific abuse; the perpetrator, his father, is now dead, and his mother (Judith Roberts) lives in a fog of dementia.

The latest kidnapping victim (Ekaterina Samsonov) is the daughter of a powerful politician (Alex Mannette), and soon enough Joe confronts a welter of conspiracies and depravities. He’s made for this work; once his allies are out of the way, he deals with his enemies the only way he knows how — by way of righteously heinous violence evoking an explicit update of one film noir title after another. In other words, he’s “The Enforcer” who is “Brute Force” incarnate. And the murder he commits, with a hammer more often than with a gun, comes out of the past — his own.

A quick, grubby mainstream crime thriller could be made from Ames’ novella. Ramsay doesn’t take the bait. There are no conventional flashbacks of conventional length. Instead, with the help of the inspired editor, Joe Bini, we catch abrupt, arresting glimpses of Joe’s past in eyeblink flashes. The story lurches forward in spasms. We’re fully in the head space of a messed-up, hollowed-out psyche. Backed by Jonny Greenwood’s sinister wash of a musical score, “You Were Never Really Here” feels like a waking nightmare.

With a different actor at its core, Ramsay’s film might’ve become attractive in that insidious Ryan Gosling “Drive” way. (I don’t like that movie; I think Nicolas Winding Refn has nothing to say about violence and rage and revenge except that blood looks fabulous on all sorts of surfaces.) Ramsay and Phoenix, working from creative improvisations, keep the movie honest. Joe truly is a mess of a human being, struggling to find remnants of the mother he knew (at the kitchen table, they sing their old favorite song, “A You’re Adorable, B You’re So Beautiful”). He’s desperate to ease his nightmares by doing some quantifiable good on the job. Ramsay’s approach sacrifices linear clarity, deliberately, for a jumble of past and present, reality and dreams.

Audiences, particularly heterosexual male audiences, still eat up the old rugged-individualist noir cliches. It’s about time a female director of serious nerve threw the genre a curveball. Some have called it a “Taxi Driver” for a new century; it’s not quite that, but it’s something, all right.