The opera's complicated plot revolves around Zelmira, her father Polidoro, the wise and beloved king of the Isle of Lesbos, and her husband, Prince Ilo. Before the action begins, Ilo had departed the island to defend his homeland. While he was gone, Azor, the lord of Mytilene and a disappointed suitor of Zelmira, had invaded Lesbos with the intention of assassinating King Polidoro and taking over his throne. Zelmira, however, had managed to conceal her father in the royal mausoleum and then told Azor that he was hiding in the temple to Ceres. Azor burnt down the temple, thinking he had killed the King, but he was in turn killed on orders from Antenore, who also aspired to the throne.
The Mytilene warriors are mourning the death of Azor. Antenore, with the help of Leucippo, plots to take over the throne of Lesbos by trying to incriminate Zelmira in the deaths of Azor and her father. At first, even Emma, Zelmira's confidante, believes the accusations. Fearing for the safety of her young son, Zelmira reveals to Emma that her father is still alive and asks her to take the child into hiding. Prince Ilo returns to the island. Zelmira is afraid to tell him of the accusations against her or to defend herself. Instead, Prince Ilo hears only Antenore's version of the story. Antenore is crowned King of Lesbos. Leucippo attempts to murder Ilo, but is stopped by Zelmira. Found with the dagger in her hand, Zelmira is now also accused of attempting to murder her husband and is imprisoned.
Leucippo intercepts a letter from Zelmira to Ilo in which she tells him that her father is still alive and that the accusations against her are false. He and Antenore temporarily free her from prison and trick her into revealing her father's hiding place. Both father and daughter are recaptured and await their deaths at the hands of the plotters. Meanwhile, Prince Ilo is distraught at what he believes to be the death of Polidoro and the unhappy end to his marriage. Emma appears and tells Prince Ilo the truth about Zelmira. He and his men rescue Zelmira and Polidoro. Zelmira is happily reunited with her husband and child, while both Antenore and Leucippo are led off in chains.