Julien feels like he has won the battle but not the war. He quickly impresses the other soldiers with his skill and professionalism. He is more ambitious than ever, hoping to become commander-in- chief of the French army by the time he is thirty. Julien also begins planning for the future of his child, who he is sure will be a boy. But all of his dreams are shattered when the Marquis de la Mole receives a letter from Mme. de Rênal, denouncing Julien as a womanizer ambitious to make his fortune by seducing rich aristocrats. The Marquis withdraws all of his support for Julien, condemns his proposed marriage to Mathilde and asks Julien to move to America.
Julien is stunned and, without a second thought, races back home to Verrières where he finds Mme. de Rênal kneeling in prayer at Church. Shaking violently, he shoots her from behind. Julien is immediately arrested and taken to Besançon to await trial. There he writes to Mathilde, ordering her to forget about him and to marry one of her many suitors. The idea of death no longer frightens Julien and he demands to be executed.
However, Mme. de Rênal was only slightly wounded from the one bullet that struck her and makes a quick recovery. Julien is overjoyed that she is not dead and for the first time in his life begins to believe in God. Mathilde and Fouqué soon arrive to help him escape but Julien refuses, deciding that he wants to die. Mathilde goes to great lengths in her efforts to save Julien, hiring lawyers and attempting to bribe the priests in charge of Julien's court case. Despite her devotion to him, Julien soon loses interest in Mathilde and begins to think of Mme. de Rênal instead. He decides that he only knew true happiness with Mme. de Rênal, not Mathilde.
Mme. de Rênal decides not to appear at Julien's trial and writes a letter to the jury demanding his acquittal. She is still in love with Julien and feels so guilty that she secretly wishes he had killed her. Despite Julien's plea for death, Mathilde thinks that she has bribed the right people to assure Julien's innocence. However, M. Valenod is the foreman of the jury and is still jealous of Julien's affair with Mme. de Rênal. He and one of Julien's enemies from the seminary pronounce Julien guilty and vote for his execution. Julien contemplates suicide until Mme. de Rênal visits him in jail. They both still love each other, and vow not to commit suicide. Mme. de Rênal confesses that she was forced by her confessor to write the letter to the Marquis, and Julien forgives her. When he is left alone, Julien finally begins to understand himself. He renounces hypocrisy as the malaise of his century and finds solace in his love for Mme. de Rênal. He wishes that he had not been so ambitious and could have just concentrated on loving her. Julien rejects all final offers of clemency and is guillotined. With a bitter sense of historical irony, Mathilde buries his severed head herself, while Mme. de Rênal dies of despair three days later.
Stendhal finishes the novel with a bitter denunciation of the political corruption of the clergy. He continues to acknowledge the existence of good men like M. Chélan and M. Pirard, but he portrays the majority of the clergy as conniving politicians. A jealous priest forces Mme. de Rênal to write her letter to the Marquis. She later admits to Julien that the priest actually wrote it himself. During Julien's trial, Mathilde bribes a large number of priests who claim they can secure an acquittal. One priest even tries to blackmail Mathilde into making him a bishop in return for his help. As he nears death, Julien refuses to find truth in a religion where priests are more concerned with politics and their salaries than in helping the poor.
Both Julien and Mathilde's reliance on French history to dictate their own destinies comes back to haunt them in this final section. Julien's admiration for Napoleonic honor and glory encourage him to both shoot Mme. de Rênal and to later refuse clemency. He falsely believes that, like Napoleon, his glory and reputation will grow with his death. He wants to be a martyr. Mathilde's obsession with her decapitated ancestor, Boniface de la Mole, comes to life as well. As Julien goes off to kill Mme. de Rênal, Mathilde notes how "Boniface de la Mole seemed reborn in him." When Julien is finally guillotined, she does not hesitate to kiss his severed head and bury it herself, just as Queen Margot did 250 years earlier. In this historical context, Julien's fate seems sealed from the moment Mathilde falls in love with him. Her idea of romance is inextricably linked to the decapitation of her lover. Julien simply reenacts a role subconsciously prescribed to him by Mathilde. Stendhal thus uses Julien's unoriginal death to further criticize the predictable and boring nineteenth century.