Madrid is rocked with controversy over the arrest and trial of the celebrated monk Ambrosio. The evidence of his guilt is so strong that even his strongest supporters abandon him, and soon he is remembered only as a hypocrite and a criminal, if he is remembered at all.
Ambrosio is tried by the Inquisition, accused of rape, murder, and sorcery. He is subject to a variety of agonizing tortures intended to extract a confession from him. When he is brought before the Grand Inquisitor, he briefly catches sight of Matilda, who looks wan and melancholy. A search of their cells revealed various books and instruments seemingly intended for dark magic, including the magic mirror in which Matilda showed Ambrosio the image of Antonia.
The situation is dire. If Ambrosio confesses, he will be burned alive; but if he continues to assert his innocence, he will be subject to even more severe tortures. Matilda confesses, and is sentenced to be burned in the next Auto da Fe.
Ambrosio's sufferings are compounded by the knowledge that this is only a prelude: after he dies, he will be subject to the fires of hell for his awful crimes. He dreams that he is in hell, and that Elvira and Antonia reproach him for their deaths.
One night before his final "examination," Matilda appears to him. She is elegant and clad in a rich gown, holding a small book. She explains that she is free of the Inquisitor's fury - she has sold her soul to the devil in exchange for her release from prison. She will go on to enjoy a rich and wonderful life; perhaps she will suffer for her crimes, but that will be far in the future.
Ambrosio is horrified to hear she has given up her immortal soul, but Matilda reproaches him. He is doomed to hell whatever he does, and he will only hasten the coming fire if he refuses the help of the devil. He has nothing to lose by signing away his soul, she explains, but he could get years of freedom and a happy life. Still, Ambrosio refuses to commit this one last wicked act. Frustrated, Matilda leaves in a cloud of blue fire, but she leaves the book with Ambrosio.
Ambrosio is led once again into torture, but unable to stand the pain any longer, he makes a full confession of all his acts of rape, murder, and sorcery - though he does insist that he has no sold his soul to Satan. The judge announces that he will be burned to death in the Auto da Fe due to take place that night.
Back in his chambers, Ambrosio weeps for his coming death. Overcome by curiosity, he opens the book that Matilda left, which is written in a peculiar alphabet. Lucifer appears in a frightening form, complete with talons and living snakes for hair. Lucifer tells Ambrosio that he will help him escape if only Ambrosio gives over his soul. The disgraced monk refuses. Lucifer roars that Ambrosio belongs to him and his nothing to hope from life or religion, but Ambrosio remains steadfast. At last, Lucifer leaves.
Ambrosio has no time to gloat - he hears the midnight bell and the boot steps of the men coming to take him to his execution. Ambrosio's terror at hearing them slide back the bolt of the door compels him to sign Lucifer's book, giving away his soul forever.
Lucifer grabs Ambrosio and spirits him away from prison. The devil brings Ambrosio to a desolate mountaintop, much to his puzzlement. Lucifer points out that Ambrosio asked only for release from prison, not for wealth or comfort. Lucifer reveals a number of shocking truths: Elvira was Ambrosio's mother and Elvira was his sitter, and Matilda was a cunning demon who disguised herself as a woman. Lucifer relishes the fact that he has totally corrupted a man who was once help up as a paragon of virtue - and it wasn't even very hard to do! Laughing Lucifer tells Ambrosio that the guards at the door of the prison did not come to take him to his execution, but to tell him that he had been pardoned and was free to leave.
At Lucifer's command, an eagle grabs Ambrosio by the head and drops him on a sharp rock. The sun scorches him, and insects come to drink his blood. Other eagles rip out his eyes, and Ambrosio lingers for an agonizing six days in this state. At last, a great storm washes his corpse into the river.
Ambrosio suffers dearly for his crimes. He is brought before the Inquisition, a powerful entity that historically enforced religious orthodoxy in Spain, and endured numerous tortures. He also loses his public reputation and is eventually forgotten entirely, a painful fate for a man as status-obsessed as Ambrosio.
Lucifer's monologue on the mountaintop contains a number of revelations. Most remarkably, the reader learns that Antonia was Ambrosio's sister and Elvira was his mother. No other backstory is given for this stunning assertion, such as the circumstances that led Ambrosio to the monastery. In the first chapter, Leonella makes brief mention of Elvira's son who died in infancy; perhaps he survived and was left at the Church of the Capuchins. This explains why Antonia thought that Ambrosio looked familiar, and why Elvira thought she recognized his voice.
The reader also learns that Matilda is actually a demon who took on the form of a woman to tempt Ambrosio. This explains Matilda's erratic behavior in the book - she cycles between being sweet and domineering, between supporting Ambrosio and pushing him to greater crimes.
Lucifer's assertion that the guards at the door came to release him is also peculiar. Possibly, the Inquisition was rewarding Ambrosio for his confession, and reasoned that since he had not signed away his soul, there might still be the possibility for him to achieve forgiveness.
In the moral world of the novel, a hierarchy of sin exists. Sins such as lying and breaking one's monastic vows are at the bottom; next is rape and murder; next is sorcery; but the worst sin of all is signing one's soul away to the devil. Lucifer himself laughs in astonishment that Ambrosio was so quick to give up his claim to mercy (pg. 448). Does this imply that Ambrosio might have been forgiven for his horrendous crimes? This is not clear. What is very obvious, however, is that Ambrosio was roundly punished for the crimes he did commit. He suffers a crime that parallels that of Prometheus from Greek mythology - being torn apart by eagles and eaten by insects before being washed into a river.