Warner Bros.

The essence of The Nice Guys is all there in the movie’s musical intro, which features the three-note, plucked-bass overture of The Temptations’ “Papa Was a Rollin’ Stone.” Like the song, the film that follows is definingly ’70s, a little funky, a little loose, and prone to wandering off on its own now and again.

The movie is the latest exercise in comic noir by the writer/director Shane Black, and it shares a great many attributes with his terrific 2006 comeback film, Kiss Kiss Bang Bang: the two mismatched detectives and their more practical female associate, the convoluted plot that features intersecting crime cases—even the hand maimed in an unfortunate encounter with a closed door.

The action takes place in 1977 Los Angeles, with Ryan Gosling playing an alcoholic private eye named Holland March who’s not above accepting the occasional paying job that’s a hairsbreadth shy of outright grift. We’re treated to an example early, when he agrees to help an elderly woman find her missing husband. “How long has he been missing?” March asks. To which she replies, “Since the funeral.” His eyes (and ours) immediately go to the urn sitting conspicuously in the middle of her mantle. He nonetheless takes the case.

Due to a misunderstanding, March soon makes the acquaintance of one Jackson Healy (Russell Crowe), another just-this-side-of-the-law gumshoe, though one cut from decidedly tougher leather. Healy’s specialty is messing up guys (preferably bad guys) for money, like a pre-superpower Deadpool, and March finds himself on the wrong end of one of his house calls. Rarely, I suspect, does a successful partnership begin with the line, “Give me your left arm, and when you talk to your doctor, tell him you have a spiral fracture of the left radius.”

But March and Healey quickly find themselves working together to find a missing woman named Amelia (Margaret Qualley), with an assist from March’s extravagantly precocious 13-year-old daughter, Holly (Angourie Rice). The eventual MacGuffin that they wind up chasing along with assorted villains—among them an assassin (Matt Bomer) nicknamed “John Boy” in sly homage to The Waltons—is the sole remaining celluloid copy of a porn movie. But not just any porn movie, mind you: This is one that has embedded in its story a corporate expose involving the auto industry, air pollution, and the catalytic converter. As an incredulous March clarifies: “So let me get this straight: You made a porn movie in which the point was the plot?”

The film, which Black co-wrote with Anthony Bagarozzi, is full of wicked nods to L.A. cinema. It’s no coincidence, for instance, that moments after a reference to a violent crime in a diner, we meet a character played by Crowe’s L.A. Confidential co-star Kim Basinger. There are echoes, too, of Magnolia, Get Shorty, The Big Lebowski, and Quentin Tarantino’s oeuvre.

But as with Kiss Kiss Bang Bang, the true spiritual precursor of The Nice Guys is the classic California noir of Hammett and Chandler, which the movie simultaneously reveres and satirizes. Black has once again taken to heart Chandler’s admonition that the “scene outrank[s] the plot,” with the latter more than happy to roam far afield in search of a good gag, whether it concerns a dye pack, ventriloquism, Mikhail Baryshnikov, asparagus pee, or death’s-eye visions of Richard Nixon. The result is a somewhat uneven movie, but one that, at its best, offers an intoxicating ride.

This is in large part due to the easy chemistry between the movie’s stars. Crowe, grizzled and chunky, is the straight man here—a kind of Bud White gone to seed. But Gosling is the real revelation, alternating smoothly between sharp line deliveries and loopy physical comedy. (It’s not quite Robert Downey Jr.’s career-resuscitating turn in Kiss Kiss Bang Bang, but it will more than do.) As Gosling’s onscreen daughter, the young Australian actress Rice does a commendable job of keeping pace, though there will be those who—not unreasonably—question the inclusion of a 13-year-old character in the midst of such decidedly adult fare. At one point, March corrects his daughter’s misuse of the phrase “rim job” in place of “rim shot.” At another, when she notes of an upscale party that “there are whores here and stuff,” he again corrects her: “Don’t say ‘and stuff.’ Say ‘There are whores here.’”

As I hope such exchanges make clear, The Nice Guys is not a movie for everyone. But for those attuned to its amiably sleazy vibe and sudden alternations between violence and slapstick, it offers a guiltily pleasurable way to pass an evening. Just under no circumstances pay heed to the title. Black’s latest film is many things, but it is by no stretch “nice.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.