The film opens with a tracking shot circling the Montmartre quarter where the story unfolds, and the director, Jean-Pierre Melville as narrator, frames the world with a stark observation:
> c'est tout à la fois le ciel et l'enfer
Bob Roger Duchesne Montagné is a gambler who carves out a quiet life in Montmartre, beloved by the demi-monde and respected for his long record of staying out of real trouble after years spent as a bank robber and convict. He even maintains a cordial relationship with a police Commissaire in the Prefecture of Police, Ledru, a man whose life Bob once saved. In a protective gesture, Bob, a true gentleman, lets Anne Isabelle Corey stay at his apartment after she loses her job, shielding her from the advances of Marc Gérard Buhr, a pimp Bob despises. Bob’s restraint stands in contrast to his generosity, and when Anne shows interest in him, he gently deflects, directing her toward his young protégé Paolo Daniel Cauchy, who soon becomes involved with her.
Through Jean Claude Cerval, an ex-con turned casino croupier in Deauville, Bob’s ally Roger André Garet learns a staggering piece of information: by 5:00 in the morning on the day of a major horse race at the nearby track, the casino safe will hold roughly 800 million French francs. With bad luck mounting, Bob hatches a plan to rob the safe, convincing a financier named McKimmie Howard Vernon to back the operation and assembling a crew to carry it out. Jean procures precise floor plans of the casino and the safe’s specifications, and even buys a bracelet for his wife, Suzanne Colette Fleury, with part of the money earned for his part in the setup.
Paolo brags about the impending score to Anne, hoping to impress her, and she, not taking him seriously, leaks the information to Marc just before they become intimate. Earlier, Marc had been arrested by Ledru for beating a prostitute, but the detective released him on the condition of providing information about a larger crime; Marc’s reaction makes Anne realize she may have stepped into something dangerous. The next morning, Anne tells Bob what she has heard, and he and Roger search for Marc but come up empty. Marc, sensing trouble, tells Ledru he has heard of a Bob-related caper and needs a little more time to verify it, and Ledru lets him go. When Bob reveals to Paolo that Marc is involved, Paolo finds Marc and shoots him just as he’s about to expose more to Ledru.
Back home, Suzanne discovers where the money for the bracelet came from and presses Bob for a bigger share of the loot. They drive to Paris to negotiate, but fail to locate Bob or Roger. Suzanne then persuades Jean to withdraw from the plan and quietly tips Ledru off—believing the operation is compromised and that secrecy must be preserved.
Believing the danger has subsided, Bob and his team head toward Deauville to execute the heist. Ledru continues his fruitless pursuit of Bob, and finally, reluctantly, moves a convoy of armed police toward the casino. Inside the casino, Bob makes his move: unless he signals otherwise, his crew will burst in at 5:00 a.m. and seize the cash at gunpoint. Although Bob has vowed not to gamble until after the score, he slips away from the crowd to test his luck, and the streak he finds is merciless. He rides an extraordinary wave of luck at roulette and then chemin de fer, losing track of time until the moment of truth arrives. When the watch hits 5:00, he signals the staff to cash out and makes a hasty, triumphant exit as the police flood the casino. A furious shootout erupts; Paolo is fatally wounded, and Bob is left cradling his dying protégé.
In the aftermath, Bob and Roger are found and handcuffed, placed in Ledru’s car with Bob’s winnings stashed in the trunk. Ledru realistically predicts that Bob will serve only a short sentence, while Roger bets that a good lawyer could secure an acquittal. Bob, ever the wry observer, quips that he might even sue for damages, a final note on a night that blends charm, risk, and the thin line Between luck and law.