Monarchical Italy in the year 1800. Cesare Angelotti, a political prisoner who has escaped from prison, has found refuge in a church. Here in the family chapel his sister, the Marchesa Attavanti has hidden clothes into which he must change and flee from Rome from the pursuit of chief of police Baron Scarpia.
The artist Mario Cavardossi is working in the church. Charmed by the image of Angelotti (Cesare’s sister) at prayer he unwittingly draws it onto the face of Mary Magdalene. Suddenly the artist sees a man leaving the chapel and with surprise realizes that it is his old friend Angelotti. The escapee applies to Mario by his easel for help. Tosca appears and Angelotti is forced back into his hiding place. Cavardossi’s absent mindedness raises Tosca’s suspicions, and noticing the likeness between the portrait of Mary Magdalene and the Marchesa she becomes jealous. Only the artist’s fervent professions of love calm Tosca. Once she is gone Cavardossi suggest that Angelotti, when the moment is right, seek shelter in his villa. Gunshots are heard; the escape has been discovered. The artist hastens Cesare to leave the chapel through a secret passage and flee to the villa.
Choristers and worshipers enter and fill the chapel: news has spread of victory over Napoleon. A celebratory mass commences. Amongst the worshipers are Scarpia, chief of police of Rome, and police agent Spoletta seeking information about the escaped prisoner. The Baron guesses that Angelotti was there and that Cavardossi hid him from the police. Scarpia intends to use the situation to his own advantage: catch the fugitive, incarcerate Cavardossi and curry favour with his long-term passion the singer Floria Tosca. The discovery of a fan belonging to the Marchesa and the likeness of the painted Madonna help Scarpia ignite the flame of jealousy in the heart of Floria. Enraged she storms to Cavardossi’s villa. Scarpia sends two detectives after her for she will lead them to the fugitive.
In his apartment in the Farnese Palace Scarpia is awaiting news. Overcome by desire he commands his subordinate to bring Tosca to him. Agent Spoletta, whom he sent to follow the singer, enters and states that the mission was unsuccessful. Scarpia orders that the arrested artist be brought to him so that he may say where the escapee is hiding. Cavardossi courageously resists attempts to force a confession from him and even manages to remind Tosca to keep silent. Scarpia tries in vain to find out her secret. Only the groans and screams of the tortured artist can make Floria lose her self-control and she reveals Angelotti's hiding place. The police bring in the tortured artist. From Scarpia’s order sending the police to the well, the artist realizes that they have managed to worm out his friend’s hiding place from Tosca. In anger he curses his beloved.
At that moment Spoletta brings news that victory was imaginary and Napoleon’s army is advancing on Rome. The enlivened artist tries to attack the chief of police but is prevented and taken away. Scarpia makes Tosca a shameful deal. He will save Cavardossi’s life and freedom if she agrees to be gracious to him. Indigently she rejects this vile preposition. Scarpia continues his remonstrance. In exchange for her agreement he promises that the firing squad will shoot blanks. Cavardossi’s salvation is the only thing that concerns Floria and so she agrees. At Tosca's insistence Scarpia writes a letter to the fortress giving the assurance that she, together with Mario Cavaradossi will be able to freely leave Rome. He attempts to embrace Tosca, but unexpectedly receives a stab from her dagger and falls down dead.
In the twilight of dawn. Cavardossi is lead to the parapet of the fortress tower (the execution ground), he has only one hour left till his execution. Mario writes a farewell letter to his beloved.
Tosca runs up. She tells the artist that the execution will not be real. On hearing the shots he must fall and give the impression that he is dead. Once the soldiers have left, he can flee. Convinced of this favorable outcome Cavardossi calmly stands before the guns. A shot is fired and he falls. The soldiers leave. Floria rushes to him, but he does not answer her call. Mario is dead. Scarpia’s order to fire blanks turned out to be a deception and his final retribution.
Tosca is surrounded by pursuers, who have learned of the murder of Scarpia. In order not to fall into the hands of the executioners, full of determination she runs to the edge of the tower: only death can reunite her with Cavardossi!