Set in Rome in 1825, Cornacchia, a skilled shoemaker, discovers that Principe Spada, a Carbonari ally, plans to reveal the organization’s uprising to the Pontifical Guard’s commander, Captain Nardoni. He hurries to warn his friend, Leonida Montanari, a doctor who leads the conspirators, who decides to strike against the informer. He and Angelo Targhini, a newcomer from the Duchy of Modena, attempt to murder Spada but fail to deliver the fatal blow. Spada survives and reports the attackers to the police, who arrest them and, after a swift judgement, sentence them to death by Cardinal Agostino Rivarola.
Meanwhile, Giuditta Di Castro, Cornacchia’s Jewish workshop assistant, who was previously in love with Montanari, begins to develop feelings for Targhini, unaware of Cornacchia’s feelings for her. While the two Carbonari are imprisoned in Castel Sant’Angelo, an idealistic The Friar is sent to urge them to repent, arguing that they cannot be executed until their souls are saved. They try to buy time by delaying the proceedings.
One day, after Giuditta accuses him of cowardice, Cornacchia reveals to her that he is actually Pasquino, the mysterious author of satirical poems against the Pope and the government. Out of his love for Giuditta, he makes a deal with Cardinal Agostino Rivarola: he will reveal Pasquino’s identity in exchange for the conspirators’ lives. Rivarola, who already suspects him, pretends to agree and gives him a note that tells him to deliver it to Captain Nardoni at Castel Sant’Angelo to have the prisoners released. The note actually orders his arrest, but if Cornacchia protests, he would reveal that he can read, confirming the cardinal’s suspicions.
With Bellachioma assisting, the shoemaker composes a poem in which he urges the authorities to hasten the executions and explains that only their deaths will awaken the people. He then appoints Bellachioma as the new Pasquino and, to escape persecution, joins a convent. Meanwhile, crowds storm Castel Sant’Angelo, leading Montanari to fear a street revolt, only to discover that many ordinary Romans also want the conspirators dead. The friar pleads with Rivarola to delay the sentence again, but the cardinal remains unmoved.
On the day of the execution, just as the condemned step toward the guillotine, the friar appears and begs them to repent, but they politely refuse. Undeterred, the friar vows to absolve them anyway, a move that Rivarola’s men prevent. In the end, Targhini is decapitated, and Montanari, facing his fate, gazes one last time at the people gathered in Piazza del Popolo and quietly speaks the final line:
> Good night, people.