Rome, June 1800. Cesare Angelotti, an escaped political prisoner, rushes into the Church of Sant’Andrea della Valle. After finding the key his sister has hidden for him, he hides in his family’s private chapel. Soon, the painter Mario Cavaradossi arrives to work on his portrait of Mary Magdalene. The painting has been inspired by the Marchesa Attavanti, whom Cavaradossi had seen praying in the church. Angelotti, who was a member of the former Bonapartiste government, emerges from his hiding place. Cavaradossi recognizes him and promises help, then hurries him back into the chapel as Tosca calls from outside. When he lets her into the church, she jealously asks Cavaradossi to whom he has been talking and reminds him of their rendezvous that evening. Suddenly recognizing the Marchesa Attavanti in the painting, she accuses him of being unfaithful, but he assures her of his love. When Tosca has left, Angelotti again comes out of hiding. A cannon signals that the police have discovered the escape, and he and Cavaradossi flee to the painter’s home. The sacristan enters with choirboys who are preparing to sing in a Te Deum celebrating the recent victory against Napoleon at the Battle of Marengo. At the height of their excitement, Baron Scarpia, chief of the secret police, arrives, searching for Angelotti. When Tosca comes back looking for Cavaradossi, Scarpia shows her a fan with the Attavanti crest that he has just found. Seemingly confirming her suspicions about her lover’s infidelity, Tosca is devastated. She vows vengeance and leaves as the church fills with worshippers. Scarpia sends his men to follow her to Cavaradossi, with whom he thinks Angelotti is hiding. While the congregation intones the Te Deum, Scarpia declares that he will bend Tosca to his will.
That evening in his chambers in the Palazzo Farnese, Scarpia anticipates the pleasure of having Tosca in his power. The spy Spoletta arrives with news that he was unable to find Angelotti. Instead he brings in Cavaradossi. While Scarpia interrogates the defiant painter while Tosca sings at a royal gala in the palace courtyard. Scarpia sends for her, and she appears just as Cavaradossi is being taken away to be tortured. Frightened by Scarpia’s questions and Cavaradossi’s screams, Tosca reveals Angelotti’s hiding place. Henchmen bring in Cavaradossi who is badly hurt and hardly conscious. When he realizes what has happened, he angrily confronts Tosca, just as the officer Sciarrone rushes in to announce that Napoleon actually has won the battle, a defeat for Scarpia’s side. Cavaradossi shouts out his defiance of tyranny, and Scarpia orders him to be executed. Once alone with Tosca, Scarpia calmly suggests that he would let Cavaradossi go free if she’d give herself to him. Fighting off his advances, she declares that she has dedicated her life to art and love and calls on God for help. Scarpia becomes more insistent, but Spoletta bursts in: Faced with capture, Angelotti has killed himself. Tosca, now forced to give in or lose her lover, agrees to Scarpia’s proposition. Scarpia orders Spoletta to prepare for a mock execution of Cavaradossi, after which he is to be freed. Tosca demands that Scarpia write her a passage of safe-conduct. After he has done so, he attempts to make love to Tosca, but she grabs a knife from the table and stabs him. She takes the pass and flees.
At dawn, Cavaradossi awaits execution on the ramparts of Castel Sant’Angelo. He bribes the jailer to deliver a farewell letter to Tosca, then, overcome with emotion, gives in to his despair. Tosca appears and explains what has happened. The two imagine their future in freedom. As the execution squad arrives, Tosca implores Cavaradossi to fake his death convincingly, then watches from a distance. The soldiers fire and depart. When Cavaradossi doesn’t move, Tosca realizes that the execution was real and Scarpia has betrayed her. Scapria’s men rush in to arrest her, but before they can, she cries out that she will meet Scarpia before God and leaps from the battlement.