The central twist of "Double Indemnity" is not a last-minute reveal but a slow-burning realization for Walter Neff: he was never Phyllis's partner, only her pawn. After they successfully murder her husband, their relationship begins to fray. The first major turn is the revelation that Phyllis was previously a nurse suspected of killing her first husband's wife. Walter then discovers that Phyllis has been secretly seeing Lola's hot-tempered boyfriend, Nino Zachetti, grooming him as her next accomplice or potential fall guy.
The climax occurs when Walter goes to the Dietrichson house to kill Phyllis, knowing she plans to kill him. She shoots him first, but he stumbles towards her. In a moment of twisted confession, she admits she never loved him "until a minute ago, when I couldn't fire that second shot." Unmoved, Walter reveals his own betrayal: he has already set Nino up to be the prime suspect. As they embrace, he shoots her twice, killing her.
The final scene reveals the full context of the film's opening. Barton Keyes arrives at the office to find the mortally wounded Walter. Walter tries to flee but collapses. In their final exchange, Keyes tells Walter he knew he was the culprit, saying he was "closer than that" when Walter guessed the killer was across the desk. As Walter lies dying, Keyes lights his cigarette, a final act of friendship and a somber conclusion to their tragic story. The entire film is a confession, and the ending confirms that for all his cleverness, Walter was doomed from the moment he met Phyllis.