Rome, 14 June 1800, the day of the Battle of Marengo, a few months after the restoration of Papal State. Cesare Angelotti, former Consul of the Roman Republic, furtively enters the church of Sant’Andrea della Valle, having escaped from the prison of Castel Sant’Angelo. He searches for the key of the Attavanti chapel, which his sister, the Marchesa, has hidden in an arranged place, he finds it and akes refuge inside.
The painter Mario Cavaradossi arrives to work on a portrait of the Magdalene. Angelotti thinks he is alone and comes out of the chapel, and is astounded to see Mario, an old friend; but their conversation is interrupted by the arrival of Mario’s lover, the singer Floria Tosca.
Angelotti hides, but Tosca has heard voices and is furiously jealous, not least because she recognizes the Marchesa Attavanti’s features in the portrait. Mario reassures her and she leaves.
Angelotti and Cavaradossi can now resume their dialogue, but when a cannon shot announces that the escape has been discovered, they leave hurriedly.
Scarpia, the chief of police, enters the church with a policeman, and in the course of their investigations they find a folding fan bearing the Attavanti coat of arms.
When Tosca arrives, Scarpia shows it to her to arouse her jealousy. Tosca sets off quickly for Mario’s villa, where she thinks she will find him with the Marchesa Attavanti, and Scarpia orders the policeman to follow her. While, in the city, news is awaited on the outcome of the clash between the Austrian general Melas and Napoleon, at Marengo, the chief of police prepares to savour the victory of capturing two conspirators and enjoying Tosca’s favours.
On the upper floor of Palazzo Farnese, Scarpia is dining and he awaits news from his policeman, who arrives to report that he has found no traces of Angelotti, but he has arrested Cavaradossi for suspicious bahaviour. The interrogation begins, and Tosca hears the cries of her tortured lover coming from the adjoining room.
Mario will not speak, but Tosca, anguished by what she hears, reveals that Angelotti is hidden in the well of the villa.
A policeman is sent off immediately, and while Mario is cursing Tosca’s weakness, the news of Napoleon's definitive victory at Marengo arrives: a moment of rejoicing for Mario, who is dragged away.
Scarpia is now alone with Tosca to bargain over Mario’s life: he will have him set free on condition that she yield to his passion. Tosca at first refuses with contempt, but at Scarpia’s insistence that it is her only hope of saving her lover, and the news that Angelotti has killed himself when he was discovered, she accepts: Mario will be shot in a mock execution, and will then be able to escape with a safe-conducted which Scarpia prepares to sign.
Now Scarpia can have Tosca at last, but as he goes to embrace her she stabs him in the brest. She takes the safe-conduct which the dead man is still clutching, and leaves.
The platform of Castel Sant’Angelo, where Mario Cavaradossi is brought to await execution. The dawn is about to break and Mario writes his last lines to Tosca. She arrives and explains about the mock execution and the killing of Scarpia.
Tosca watches the execution from a casemate and when all the soldiers have left she goes over to him. She barely has time to realize that Mario is dead when shouting is heard: Scarpia’s corpse has been found. As a policemen rushes towards her she hurls herself from the battlement.