At the house of Fabrizio Vingradito and his wife Lucia there is joy for the imminent return of their son Giannetto from the war. One of the servants, Ninetta, is in love with Giannetto and all want the two to marry except Lucia, who blames Ninetta over the recent loss of a silver fork. Isacco, a local pedlar, enters and asks about Ninetta, but Pippo sends him away. Giannetto arrives and goes inside with Lucia while Ninetta prepares for the party. Once they have gone, Ninetta's father, Fernando Villabella arrives, also from the war. However he has been sentenced after fighting with his captain, and, condemned to death, is now a deserter. He asks his daughter to sell two pieces of family silver to go towards his expenses while he is on the run. The Mayor enters, intent on seducing Ninetta. She claims that her father is just some vagrant. The Mayor's assistant delivers the arrest warrant for a deserter (Fernando), but as the Mayor has forgotten his reading glasses, Ninetta is asked to read the warrant, and makes up a description of someone totally unlike her father. The Mayor continues to force his attentions on Ninetta, at which Fernando, in anger, almost reveals himself. The three leave, and a magpie flies down and steals one of Lucia's silver spoons.
Isacco passes by again, and Ninetta sells him the silver her father had entrusted to her. Giannetto and others return, and Lucia notices that a spoon is missing. The Mayor starts an immediate investigation, stating the draconian penalty for domestic theft: death. Lucia and the Mayor accuse Ninetta, who in her distress drops the money she had exchanged from Isacco. The pedlar is brought back and reports that he has already sold on the spoon, but he recalls an inscription F.V. (Fernando's initials) on them. The stunned Ninetta, desperate to protect her father, is unable to refute the accusations, and the Mayor orders her to be arrested.
Antonio, the prison warder takes pity on Ninetta and says that he will get a message to Pippo, and let Giannetto visit her. Ninetta convinces Giannetto that she is innocent. The Mayor now arrives and tells Ninetta that if she accepts his advances he will get her freed - she replies that she would rather die. The Mayor is called away but Antonio has heard all and offers to help Ninetta any way he can. Ninetta asks Pippo to sell a gold cross and put some money for her father in an agreed hiding place - a chestnut tree. Ninetta is brought to trial, found guilty, and condemned to death. Fernando rushes to the court to save his daughter's life, but is too late; he too is sent to prison, while she is condemned to death.
Ernesto, a military friend of Fernando bursts in looking for the Mayor, and holding a royal pardon for Ninetta's father. Pippo shows him the way and is given a silver coin for helping, but the magpie snatches it and flies up to the tower. Pippo and Antonio pursue the thief.
Ninetta is taken to the scaffold, and makes her final speech to the crowd. From the tower, Pippo and Antonio cry out that they've found Lucia's silver in the magpie's nest and they ring the bells. The crowd hear their words and hope to save Ninetta, but shots ring out and they conclude they are too late. However, Ninetta appears walking down the hill - the shots were mere rejoicing. Ninetta celebrates with her companions but is worried about her father. He then appears with Ernesto and all - except the Mayor - enjoy a happy ending.
The most famous aria in the opera is probably Ninetta's prayer "Deh, tu reggi in tal momento". The soprano cavatina "Di piacer mi balza cor" and the tenor cavatina "Vieni fra queste braccia" (the cabaletta for the duet between Arturo and Elvira from Bellini's I Puritani starts with exactly the same words) are two examples of Rossini's brilliant vocal writing.