A village in Italy during the Napoleonic Wars
In the courtyard of the rich farmer Fabrizio's house preparations are underway for a joyful celebration: Giannetto, the farmer's son, is returning from the wars. The merriment is heightened by a speaking magpie: she calls out the name of Fabrizio's servant – the village boy Pippo – and in response to Giannetto's mother Lucia's remark that her son must marry, she pronounces the name of the servant Ninetta. Ninetta is delighted, because soon she will see her beloved and her father, both of whom have been at the wars. The street pedlar Isacco looks into Fabrizio's courtyard, but Pippo drives the old man away. At the same time, the delighted cries of the villagers can be heard – at last they will see Giannetto. Entering the courtyard, he embraces Ninetta and declares that he loves her. Pippo sings table-couplets and the feast commences.
As the guests depart, Fernando appears dressed in rags - he is Ninetta's father. He tells his daughter that due to a quarrel with his captain he has been sentenced to death but managed to flee. Steps are heard – both are frightened by the unexpected visit from the village mayor Gottardo. He intends to gain the girl's favour and begins to court her. When the mayor's servant issues a decree for the arrest of the fleeing deserter, unseen, Fernando passes his daughter a spoon with the initials "F. V." (Fernando Villabella) and asks for money for it in order to flee. Gottardo, who is unable to read the decree without his glasses, asks Ninetta for assistance, and she cunningly alters the name and features of the deserter. Sending the old man away, the mayor again begins to lavish his courtship on the girl, but Fernando comes to his daughter's aid. The insulted admirer promises to repay the offence. While they are determining their relationship, the magpie seizes one of the silver spoons from the table and flies away.
Ninetta sells Isacco her father's spoon. But Lucia notices that her table silver is missing. The mayor is delighted to begin a trial, threatening punishment for theft. The magpie again cries out Ninetta's name. Accused of theft, the girl weeps and, taking a handkerchief from her pocket, drops the money from the proceeds of the sale on the floor. Isacco is called as a witness, and he confirms that he bought a spoon with the initials "F. V." from Ninetta (like those of the master of the house Fabrizio Vingradito). The girl cannot reveal the truth, and the mayor rejoices – now he will force her to beg for mercy. The gendarmes take Ninetta to prison.
Giannetto, confident of his fiancée's innocence, visits her in jail. He asks her to tell him how it all happened, else the mayor may condemnher to death. The jailer Antonio warns the lovers – Gottardo is near. The mayor is determined that his feelings be reciprocated, and he offers salvation for love, but Ninetta would rather part with her life.
At Ninetta's request, Pippo comes to the prison. The adoring youth agrees to her request – to borrow money and take it to an agreed place. Bidding farewell, Ninetta gives him a crucifix in memory.
Fernando, on learning from Lucia about his daughter's crime, sets off for the court in confusion. Femida's servants condemn the girl to death. Ninetta's friends and beloved try to argue this decision. Her father cannot bear it and reveals himself and he is arrested. Lucia feels a sense of guilt and is almost prepared to adopt Ninetta. But it is too late – the girl is taken away to be executed. Pippo and Antonio who have climbed the town's tower after the magpie who stole the money find in her nest the ill-gotten silver among other trophies. The chiming of the bell stops the execution. Ninetta is not guilty. Fernando's destiny is also happily resolved: the war is over and he has been pardoned by the king's decree. Now Ninetta and Giannatto can celebrate their wedding.