The opera opens in the church of San’Andrea della Valle in the Rome of 1800. The city is under the cruel fist of the police chief, Baron Vitellio Scarpia, and in immediate danger of invasion by Napoleon.
An escaped prisoner, Cesare Angelotti, who rushes into the church and hides in the chapel owned by his sister. A liberal and revolutionary artist, Mario Cavaradossi comes in shortly thereafter to continue his work on his portrait of the Madonna, which was inspired by the Marchesa Attavanti, whom he has seen but does not know. While an old Sacristan of the church is doing his morning duties, Cavaradossi rhapsodizes over the raven beauty of the woman he loves, the singer Floria Tosca, so different from the blonde Madonna he is painting.
When the Sacristan leaves, Angelotti comes out from hiding. He recognizes Cavaradossi as a cohort. Having been tortured by Scarpia, Angelotti is barely recognizable, but Cavaradossi wants to save him. They are interrupted by the entrance of Tosca, who has come to see her lover. Angelotti hides. Cavaradossi, who wants to keep Tosca in ignorance of Angelotti’s presence, has to quiet her jealous fears about the woman in his portrait of the Madonna. Finally Cavaradossi gets Tosca to leave, and Cavaradossi runs out with Angelotti, leading him to his country villa.
The Sacristan and the acolytes rush in, preparing to celebrate a victory over Napoleon. Scarpia enters, having tracked Angelotti to the church. Tosca returns to find her lover gone. Scarpia sows seeds of jealousy in Tosca, suggesting what she most fears: that her lover is having an affair with the woman who is the model for the Madonna. Tosca, crazy with jealousy, rushes away. Scarpia sends his minions to follow her because he believes that Angelotti is with Cavaradossi and that the jealous prima donna will lead them to Cavaradossi and Angelotti. The crowd fills the church to celebrate the supposed victory over Napoleon, and the act closes as Scarpia, ignoring all those around him, sings of his lust for glamorous diva Tosca.
Scarpia, in his apartments at the Farnese Palace, sends for Tosca, tellling her in his message that he has news about Cavaradossi.
Scarpia’s henchman Spoletta arrives with Cavaradossi and Scarpia begins to interrogate the painter as to Angelotti’s whereabouts. He gets nowhere and sends Cavaradossi off to the torture chamber adjacent to his office. Tosca, who has previously sung in a concert celebrating the alleged victory over Napoleon, appears. Her actions tell the police chief that she knows about Angelotti, and he makes her listen to Cavaradossi’s torture. She can’t bear it, and tells where the prisoner is hiding. When the unconscious Cavaradossi is brought in and comes to his senses, Scarpia cruelly lets him know that Tosca has talked. At almost the same time word comes that Napoleon has won, and Cavaradossi indulges in a cry of victory; he advocates the liberty, equality and fraternity that he thinks Napoleon represents.
Cavaradossi is dragged to prison, and Tosca is left to bargain with Scarpia for her lover’s life. Scarpia suggests that Tosca yield herself to him in exchange for Cavaradossi’s freedom. Tosca fights off Scarpia and prays to God for help. But, eventually, she agrees to Scarpia’s demands in exchange for a mock execution (an order that Scarpia gives to Spoletto and then sends him out of the room). Tosca also demands a safe conduct pass for her and Cavaradossi. After Scarpia has written the pass, Tosca stabs Scarpia, rejoicing in his death.
Before dawn on the roof of the Castel San’Angelo, Cavaradossi writes a letter to Tosca about his love for her as he looks for the last time at the starry sky. Tosca rushes in and tells him how she killed Scarpia. The reunited lovers believe that they will soon be free. Tosca tells Cavaradossi to fake his death as she believed Scarpia when he promised the firing squad would only shoot blanks
The soldiers come; they shoot; Cavaradossi falls. Tosca waits until they leave, rushes to him, and finds that Scarpia has thwarted her. The bullets were real and Cavaradossi is dead. Scarpia’s henchmen have found his body. They rush to apprehend Tosca; she mounts the parapet and cries, “Scarpia, we will meet before God” and plunges to her death.