Cesare Angelotti, an escaped political prisoner, runs into the church of Sant’Andrea della Valle to hide in the family chapel. The Sacristan enters to pray and is interrupted by the painter Mario Cavaradossi, who has come to work on his portrait of Mary Magdalene — inspired by the Marchesa Attavanti, Angelotti’s sister. Cavaradossi contrasts the beauty of the blond marchesa with that of his lover, the raven-haired singer Floria Tosca (“Recondita armonia”). When the Sacristan leaves, Angelotti ventures out and is recognized by the painter, who gives him food and hurries him back into the chapel as Tosca is heard outside. She jealously questions Cavaradossi, then prays and reminds him of their rendezvous that evening (“Non la sospiri”). When she recognizes the marchesa’s likeness, her suspicions are renewed, but he reassures her (“Qual’occhio al mondo”). When she has left, Cavaradossi summons Angelotti, as a cannon signals that the police have discovered the escape; the two flee to Cavaradossi’s villa. The Sacristan returns with choirboys who are about to sing a Te Deum. Their excitement is silenced by the entrance of Baron Scarpia, chief of the secret police, in search of Angelotti. When Tosca returns looking for her lover, Scarpia shows her the Attavanti crest on a fan he has found. Thinking Cavaradossi faithless, Tosca tearfully vows vengeance and leaves, as the church resounds with the Te Deum. Scarpia has the diva trailed, scheming to get her in his power.
In the Farnese Palace, Scarpia anticipates the pleasure of bending Tosca to his will (“Ha più forte sapore”). The spy Spoletta arrives; having failed to find Angelotti, he placates the baron by bringing in Cavaradossi, who is interrogated while Tosca is heard singing at a royal gala downstairs. She enters as her lover is led away to be tortured. Unnerved by his screams, she reveals Angelotti’s hiding place. Cavaradossi is carried in; realizing what has happened, he rages at Tosca. When the gendarme Sciarrone rushes in to announce that Napoleon has won the Battle of Marengo, a defeat for Scarpia’s side, Cavaradossi shouts his defiance and is dragged to prison (“Vittoria! Vittoria!”). Scarpia suggests Tosca yield to him in exchange for her lover’s life. Fighting him off, she protests her fate to God, saying she has dedicated her life to art and love (“Vissi d’arte”). Spoletta interrupts: faced with capture, Angelotti has killed himself. Tosca accepts Scarpia’s proposition. The baron orders a mock execution, and Spoletta leaves. Scarpia prepares a document of safe-conduct for the lovers. When he embraces her, Tosca stabs him with a knife from the table and slips out.
A Shepherd is heard singing as church bells toll the dawn. Cavaradossi is led to the roof of Castel Sant’Angelo to await execution; he bribes the jailer to convey a farewell note to Tosca. Writing it, overcome with memories of love, he gives way to despair (“E lucevan le stelle”). Suddenly Tosca runs in with the story of her encounter with Scarpia. Cavaradossi caresses the hands that committed murder for his sake (“O dolci mani”), and the two hail the future. As the firing squad appears, the diva coaches her lover on how to fake his death convincingly; the soldiers fire and depart. Tosca urges Cavaradossi to hurry, but when he doesn’t respond, she discovers Scarpia’s treachery: the bullets were real. Spoletta rushes in to arrest Tosca. She climbs the battlements and, crying that she will meet Scarpia before God, leaps to her death.