There aren't too many filmmakers who could set a movie in 1970 and know how to get the feminine eye make-up exactly right. But Paul Thomas Anderson does: in Inherent Vice, the women are mostly southern California hippie vamps, but their coral eye shadow and mascara-coated lashes are still stuck in the Liz Taylor '60s. That seems a perfectly realised detail.

Inherent Vice is a down-and-dirty detective story set in Los Angeles, and the movie is about 1970 as much as it is about detecting anything. It zeroes in on the moment when the freaky liberation of the counterculture had begun to decay into sleaze. Joaquin Phoenix, acting with what has become his trademark fusion of vivid exterior and naggingly vague interior, plays Larry "Doc" Sportello, a shaggy hippie detective who is always stoned. The film plays his bleary-eyed dissolution for comedy, often in a fairly obvious way, but the fact that Doc observes everything through a lens of foggy detachment doesn't necessarily mean he is at a disadvantage. The film's running joke is that Doc's druggy haze may be as good a way as any to make sense of a world in which freedom has become an intoxicated form of corruption.

Phoenix, in greasy long hair, a beat-up US Army jacket, and overgrown mutton-chop sideburns that make him resemble John Lennon in his early '70s 'lost weekend' period, looks decidedly untidy – you can just about smell how infrequently Doc bathes – but the actor, as he proved in the brilliant fake documentary I'm Still Here, is an expert at turning dereliction into something weirdly charismatic. In Inherent Vice, you fasten onto Doc, knowing that his slovenly sincerity and dazed, slow-motion reactions make him as close to a moral centre as the movie is going to have. In the opening scene, he sits around with Shasta Fay Hepworth (Katherine Waterston), his willowy ex-flame, who begs for his help regarding a powerful suburban real-estate developer she's been sleeping with. It seems that he's the target of a kidnap plot, and as Shasta purrs out her saga, which sounds like a come-on as much as a plea for help, we can sense that it's just the tip of the iceberg.

'Comedy of dread'

Inherent Vice is the first authorised adaptation of a Thomas Pynchon novel. But the book, published in 2009, isn't one of Pynchon's down-the-rabbit-hole surrealist jeremiads, the kind that can leave you wishing that James Joyce had never been born. It's closer to an Elmore Leonard novel on bad acid. The basic story goes right back to Chandler and Hammett, with Los Angeles treated as a maze of perversity: our hero bounces from one flamboyantly odd character to the next, and each encounter provides another small piece of the puzzle, but what they really add up to is a guided tour of flaky LA decadence. In tone, Inherent Vice has been majorly influenced by the 1973 Robert Altman classic The Long Goodbye, in which Altman tossed Chandler's Philip Marlowe (played by a squinty, bumbling Elliott Gould) right into the pulsating Jacuzzi of the sex-and-drugs '70s. Anderson mimics the essential joke of Altman's film – that when the counterculture lost its idealism (and ratcheted up its hedonism) it became just as selfishly sinister as the world it was designed to overthrow. It began to merge with that world, as the pot and pills and orgies transformed the hippie culture into a new, even wilder brand of mainstream narcissism. Inherent Vice is set the year after the Manson murders, and it's steeped in the paranoia of a moment when every hippie, at least in Los Angeles, has come to look like a potential member of a dangerous 'cult'.

Anderson is a wizard with actors, and this time he specialises in the kind of offbeat casting that grips your attention whenever a noteworthy star pops up in a "Wow! Really?" sort of role that somehow seems tailor-made for each of them. Doc has encounters with a super-square, crew-cut LA cop, played by Josh Brolin as a glowering fascist who seems to know what's going on with everyone but himself – the biggest clue to that is the way he keeps chowing down on phallic, chocolate-covered frozen bananas. Owen Wilson plays a hippie musician who's an underground informer for the FBI and must act like a public rabble-rouser to maintain his cover. And Jena Malone, with a manner so wide-awake it's creepy, is Wilson's ex-flame, a former junkie and single mother. 

Inherent Vice is staged as a knowing ramble, a straight-meets-stoner comedy of dread that keeps threatening to spill into farce. The film features an Indo-Chinese heroin cartel, the Golden Fang, which will do anything to protect its interests, even if that means erecting a consortium of dentists as a cover. The fake corporation is led by Martin Short as a purple-suited, cocaine-addled lech, and at first we think: great, an evil Martin Short! But his debauchery is played strictly for laughs, which shipwrecks the power of his part in the plot. At one point, the seductive Shasta shows up for an extended scene in Doc's beach house and takes about 10 minutes to present herself as the kind of all-American temptress flower who Charles Manson preyed upon. Waterston turns in a sultry piece of acting, but what exactly is this scene doing in the movie? I still have no idea.

Inherent Vice has a dazzling and often entertaining atmosphere of debasement, like a smiley face rotting from the inside. Yet there's a real limit to its pleasure. These days, you practically have to be a detective to watch a PT Anderson film: he still knows how to lead the audience through a story, but in a way that's all too calculated to throw off vapours of obscurity. The new film isn't as deliberately baffling as The Master, in which the tale of a self-help guru and his damaged disciple was all grandly floating metaphor without any true social or emotional context. Yet the trouble with Inherent Vice is that its heart of darkness keeps shifting around. That's supposed to be the point: 1970 wasn't about definitions, man! It was about the lack of definition. Yet this fuzziness turns the movie into a detective yarn that's captivatingly disheveled around the edges but so studiously off-centre that, by the end, it barely has a centre at all.

★★★☆☆

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.