Cesare Angelotti, a political prisoner, has just escaped from the jail at Castel Sant’Angelo and seeks refuge in the church of Sant’Andrea della Valle. A Sacristan enters followed by the painter Mario Cavaradossi, who climbs the scaffold and begins to work on his painting, a portrait of Mary Magdalene. Angelotti comes out of hiding and asks for his friend Cavaradossi’s assistance as the voice of the painter’s beloved, the famous opera singer Floria Tosca, is heard. She enters demanding to know why she was kept waiting and suspects Cavaradossi of talking to another woman. He reassures her of his love, and the pair agrees to meet that evening.
A cannon shot is heard announcing Angelotti’s escape, and the friends flee. The Sacristan gathers choristers around him, telling them they must rehearse for a special performance for which Tosca will be the soloist. At that moment, the Roman chief of police, Baron Scarpia, arrives searching for Angelotti. Scarpia soon realizes that Cavaradossi had aided Angelotti’s escape; he convinces Tosca, who has just returned, that Cavaradossi has fled with another woman. Scarpia hopes Tosca will then lead him to Cavaradossi, and thus to Angelotti. He vows to ensnare them all.
Dining alone in his quarters, Scarpia receives word that Cavaradossi has been arrested. He summons Tosca from her concert in the courtyard below, and she is shocked to see the captured Cavaradossi. Scarpia tries to get the location of Angelotti’s hiding place from Tosca, but she insists that she knows nothing. As Cavaradossi is tortured in the next room, she reveals the secret and asks Scarpia for Cavaradossi’s freedom in return. Delirious from torture, Cavaradossi hears Scarpia order his men to Angelotti’s hiding place, curses Tosca, and cries defiance at the tyranny of Scarpia.
Tosca pleads for her lover’s life, and Scarpia offers her an exchange: if she will give herself to him, he will give Cavaradossi back to her. In despair, she pleads for mercy but realizes she must agree to the bargain. Scarpia tells Tosca there must be a mock execution and circuitously orders his henchman to make preparations for a real one. At Tosca’s request, he then writes a safe-conduct pass for her and Cavaradossi and prepares to claim his prize. She grabs a knife from the table and stabs him, then takes the pass and goes to find Cavaradossi.
Outside the prison, Cavaradossi bribes the jailer for permission to write a farewell letter to Tosca and recalls pleasant memories of times they spent together. She hurries in, explaining that there is to be a mock execution in which he is to pretend to die. She also tells him about Scarpia’s murder and of the safe-conduct pass that will get them out of Rome. The lovers ecstatically plan for the future but are interrupted by the arrival of the firing squad. Tosca urges Cavaradossi to fall convincingly. Tosca bids him to wait until they are gone and then asks him to rise and come away with her. She is horrified to discover that the execution was real after all, and distant shouts announce Scarpia’s murder. As the soldiers rush in to seize Tosca, she climbs to the fortress parapet and leaps to her death.