It is an evening in eighteenth-century Venice. In a square on the Grand Canal, with a view across to the Ducal Palace and the Isle of San Giorgio, people stroll around as the sun goes down, while the tradeswomen call out their wares. The young Neapolitan macaroni cook Pappacoda observes that, for all the splendours of the city, Venetians do not have everything without their macaroni cook. "Macaroni as long as the Grand Canal, with as much cheese as there is sand in the Lido" - that is what Pappacoda offers. The young man is approached by Enrico, a naval officer, enquiring whether the Senator Delacqua is at home. When he is told that he is at a sitting of the Senate, Enrico sees it as an opportunity for a few private minutes with the Senator's young wife Barbara. However, she also is out, so Enrico slips Pappacoda a coin to give Barbara a letter with the message that Enrico will be ready for her at nine o'clock that evening.
As the people watch, a boat arrives carrying Annina, a fisher-girl, who is hawking her fruitti di mare. Pappacoda greets her, hinting that what has really brought her hither is the imminent arrival of the Duke of Urbino, and more particularly his barber Caramello, Annina's sweetheart. "Caramello is a monster, a ne'er-do-well, and a conceited blockhead into the bargain", she pouts. "Stupidity is no hindrance to love", Pappacoda retorts, sampling an oyster. "After all, I'm passionately in love with Ciboletta, Signora Delacqua's pretty cook - a girl as stupid as this oyster, and yet just as appetising, just as worthy of catching!"
When Barbara Delacqua returns home, Pappacoda gives her the message from Enrico and receives another tip for his troubles. Annina departs with Barbara, leaving Pappacoda to greet his own girlfriend, Ciboletta. She is wondering when they are going to get married, and he promises that they will do so just as soon as he gets a position in service.
The senators return from a stormy session, discussing the banquet that the Duke of Urbino is to give today when he arrives for his annual Carnival-time visit to Venice. The Duke is a notorious womaniser and has already cast his roving eye on Barbara, so Delacqua has taken the precaution of arranging for his wife to be taken by gondola to Murano to stay with an old abbess aunt in the convent there.
The Duke's arrival is signalled by the appearance of a gondola carrying his personal barber, Caramello, who is warmly greeted by the crowd. He proceeds to show off his close acquaintance with the Duke and rounds things off with an agile tarantella for good measure. He quickly spots Annina, but she is not too pleased that he has practically ignored her for the past year. She becomes interested enough when the subject of their talk turns to marriage, but Caramello explains that he is eager to obtain a position as the Duke's steward before committing himself to matrimony.
In pursuit of amorous adventures on his master's behalf Caramello has learned with interest from Pappacoda that a gondolier is due to take Barbara Delacqua to Murano at 9 p.m. What he does not know is that his own girlfriend, Annina, has been persuaded by Barbara to take her place in the gondola, so that Barbara may spend her time with Enrico Piselli. Annina is determined to be back within the hour so that she may join in the Carnival dancing with Caramello, Pappacoda and Ciboletta in masks borrowed from their masters.
The Duke arrives and greets Venice and its people. He loves them all, he tells them, though it appears that he seems to love the pretty girls rather more than the rest. To the Duke's great delight, Caramello reveals to him his plan to take the place of the gondolier in the gondola calling for Barbara. Instead of taking her to Murano, he will then deliver her to the Duke's palace. Pulling on a gondolier's cloak and hood, he sets off on his adventure. The scene is set and the evening still, as the Duke looks up to Delacqua's balcony and sings a serenade. Inside the Delacqua house Barbara and Annina are making their final preparations, putting on the domino masks that will disguise them, as they await the sound of the gondolier's song that is to be the agreed signal. Below, Ciboletta brings Pappacoda a carnival costume.
Finally the voice of Caramello is heard from the gondola singing the gondolier's song. Delacqua helps into the gondola the masked figure he believes to be his wife and he bids her farewell as the Duke looks on with keen anticipation. A group of sailors appear and, with Enrico at their head, they sing a serenade to Delacqua for his birthday the following day. While Delacqua is on the balcony thanking the singers, Barbara slips out to join Enrico. The birthday serenade merges with the sound of Caramello's gondola song as night falls on Venice and the disguised Caramello glides away with his masked sweetheart Annina, neither knowing the true identity of the other.
Watching from a room in his palace, the Duke is eagerly awaiting the arrival of the gondola in which Caramello is due to bring Barbara, as Agricola, Constantia and the other senators' wives arrive in their carnival costumes, ignoring their husbands' fears for their moral safety. Finally the gondola is seen approaching, and the Duke ushers his guests into the ballroom while he prepares to greet his special lady guest. When Caramello and Annina arrive and masks are removed, Caramello is dismayed to discover who it is he has brought for the Duke's pleasure, but Annina fancies making the most of the opportunity with the Duke that fate has given her.
Caramello does his best to warn the Duke off Annina. "Don't trust her. She scratches and bites!" he warns. Finally Annina and the Duke are left alone, and the disguised Annina is shocked and thrown on the defensive when the Duke rhapsodises over the receptive response that his advances to Barbara had previously aroused. As the orchestra in the ballroom strikes up a waltz, the Duke takes the reluctant Annina into his arms.
Caramello finds an excuse to interrupt the amorous scene, and Annina persuades the Duke to take her into the ballroom. While they are away, Caramello opens the doors to the Duke's apartments, and a crowd enters, including Pappacoda, prominent in a faded, shabby senator's costume with false, misshapen nose and spectacles and with his pockets stuffed with sausages, meat and pastries. Pappacoda has brought with him all his tradesmen friends, to whom he has distributed invitations given to him by Caramello. They are wide-eyed at the scale of the Duke's hospitality and, having introduced his friends to Caramello, Pappacoda invites them to help themselves.
As the Duke seeks somewhere to be alone with Annina, a group of senators and their wives detain him. Among them are Senator Delacqua and his supposed wife, and the Duke is taken aback at being introduced to a second Barbara. However, Annina identifies this "wife" for the Duke as the masked Ciboletta. The Duke goes along with Ciboletta's pretence, as he recalls the serenade he had sung to Barbara at previous carnival times. Delacqua pushes the supposed Barbara forward to put his own case for the position of the Duke's steward, but Ciboletta instead asks for a place for Pappacoda as the Duke's personal cook, and the Duke is only too ready to oblige her. Delacqua departs to join Barbara in Murano, leaving the Duke to take supper with Annina and Ciboletta. Caramello has sent away the servants, and he and Pappacoda wait on the trio personally in order to keep their eyes open for any unwelcome developments.
As the Duke courts the two ladies, Caramello and Pappacoda repeatedly interrupt. The cook gives a timely discourse on his culinary arts before the senators' wives arrive seeking the Duke's attention. By now midnight is approaching - the time when the Duke must go to lead the revels in the Piazza San Marco. When the bells of St. Mark's Basilica sound out, Annina joins in the revelry, and all go off in masks to enjoy themselves.
In the Piazza, before the moonlit cathedral, the revellers are celebrating, but Caramello stands alone, reflecting upon Annina's flirtation with the Duke and lamenting the fickleness of women. Ciboletta, meanwhile, is looking for Pappacoda to tell him of his appointment as the Duke's personal cook, a piece of news that dispels Pappacoda's wrath at Ciboletta's adventures with the Duke. Now they can marry. When Pappacoda goes to pay his respects to the Duke, Ciboletta reveals to the Duke that the young lady on whom he had been lavishing his attention was not Barbara but Caramello's sweetheart Annina. When the Duke finally catches up with Annina, he finds her telling the senators' wives all about her escapade with him. Fanfares announce the start of the grand Carnival procession, in which all sections of Venetian life are represented and, when it is over, the pigeons of St. Mark's flutter down into the square.
Delacqua has returned, distressed by the discovery that Barbara is not in Murano and, when she appears with Enrico, the young man reassures Delacqua with a story of how he has rescued his aunt Barbara from an impostor gondolier. The Duke is decidedly less interested in Barbara when he discovers that she has a nephew as big as Enrico, and he rewards Caramello for delivering him from a potentially awkward situation by making him his steward. Caramello and Annina can therefore join Pappacoda and Ciboletta in marrying, and the revelries are set fair to go on long into the night.