Quentin Tarantino's brilliant and brutal revenge western is a wildly exciting return to form: a thrilling adventure in genre and style climaxing in a bizarre and nightmarish scenario in a slave plantation in 1858. The movie is managed with Tarantino's superb provocation and audacity, with a whiplash of cruelty and swagger of scorn. It is superbly acted by Christoph Waltz, Jamie Foxx, Kerry Washington, Leonardo DiCaprio and, particularly, Samuel L Jackson, who creates a masterpiece with his chilling character Stephen, the grey, stooping servant-elder to DiCaprio's unspeakable slave-owner Calvin Candie.

Just to make liberals everywhere uneasy, Tarantino and Jackson make Stephen the biggest, nastiest "Uncle Tom" ever: utterly loyal to his white master, and severe in his management of the below-stairs race in the Big House. He fixes everyone with a chillingly shrewd, malevolent stare made even more disquieting by an unsettling Parkinson's disease tremor — an inspired touch. Stephen is overwhelmed with disgust for uppity racial politics (though that isn't how he phrases it) and he and Tarantino drop the satirical N-bomb, targeted with sadistic tactlessness and muscular bad taste at the white man's Vichyite collaborators in the Old South. Slavery is a subject on which Hollywood is traditionally nervous and reticent. Perhaps it takes a film unencumbered with good taste to tackle it. Lars Von Trier's Manderlay was one. Here is another.

Reading on mobile? Click here to watch the video

Django Unchained also has the pure, almost meaningless excitement which I found sorely lacking in Tarantino's previous film, Inglourious Basterds, with its misfiring spaghetti-Nazi trope and boring plot. I can only say Django delivers, wholesale, that particular narcotic and delirious pleasure that Tarantino still knows how to confect in the cinema, something to do with the manipulation of surfaces. It's as unwholesome, deplorable and delicious as a forbidden cigarette.

Django Unchained is a loose reworking of Sergio Corbucci's spaghetti-western Django from 1966, starring Franco Nero, who at 71 returns in a brief cameo here. But it is more obviously inspired by Richard Fleischer's exploitation cult item Mandingo (1975) about a slave trained to fight other slaves, an outrageous movie which Tarantino has often praised, his gleeful support only increased by the critics' nose-wrinkling disapproval.

Foxx plays Django, a slave who is being led across Texas in a chain gang, when his master meets Dr King Schultz, a German played with dapper and dainty eccentricity by Waltz. Claiming to be a travelling dentist, Schultz is driving a bizarre wagon with a huge model of a molar on the top. He buys Django and promises him his freedom in return for a favour: he needs Django to help him track three white slave-overseers with whom he has business. Django proves himself an able assistant and a brilliant gunfighter and Schultz is electrified to learn that Django is married to a woman (Kerry Washington) whose German owners taught her the German language and named her Brünnhilde, which her subsequent ignorant purchasers mishear as "Broomhilda". She was spitefully sold off separately because she, like Django, was always defiantly running away. Now she has been branded on the face as a punishment and forced to work as a "comfort" girl.

Moved by her association with the Fatherland, Schultz vows to help Django find Broomhilda and wreak terrible vengeance on the people who mistreated her, a quest which brings them into contact with a staggeringly incompetent KKK posse (straight out of Blazing Saddles) and then into the heart of darkness, the Candieland plantation, ruled by Candie played by DiCaprio with satanic politesse and bad teeth. But Django must swallow his pride and pretend to be that most hated of things, a "Mandingo", a fighter-trainer and the white man's tame plaything, and uncomfortably close to Stephen's domestic servitude.

There are moments of pure directorial mastery and audience enjoyment. Schultz creates outrage in a small town, by riding in and permitting his black associate to ride a horse alongside him, a privilege which outrages the local racists. The tension leads to a standoff and a gunshot which induces the townsfolk to stand stock-still, astonished, and then a lady faints in the background: a visually inspired touch, and utterly unexpected. It's as if Tarantino has cheerfully snapped his fingers in your stunned face.

Django is a long film, undoubtedly, at two hours and 45 minutes, and Tarantino may even have been tempted to split it into two, like his Kill Bill movies. But Django relaxes and luxuriates in its long form, balancing deadpan moments of awe and reverence for the landscape, lovingly photographed by Robert Richardson, with the frantic orchestration of tension and violence, cheekily giving us crash-zooms on to important faces.

Yet the sense of pastiche is relatively restrained. The relationship of Schultz and Django is managed with insouciant ease: their friendship really looks convincing and their comedy double-act is terrific; Schultz is glum and saturnine while Django becomes more and more regally resplendent: Foxx is effortlessly charismatic. I can't wait to see this again.