Most scenes take place in the palace, but two scenes are set in the cemetery, with the final scene taking place outdoors. The action extends over one day, the final scene taking place shortly after sunrise. In the original source Rodelinda and Cunicpert are sent into exile; in the opera she remains in Milan and becomes the central figure. The actions around her must therefore all be regarded as fictitious.
Grimoaldo has defeated Bertarido in battle and usurped his throne. Bertarido has fled, and it is believed that he has died in exile, but he sends word to his friend Unulfo that he is alive and in hiding near the palace. Grimoaldo is betrothed to Bertarido's sister Eduige, and though she loves him and he returns her affection, at least at first, she keeps putting off the wedding. Rodelinda and her son, Flavio, are being kept in the palace by Grimoaldo, who has fallen in love with her.
Alone, Rodelinda mourns the loss of her husband. Grimoaldo enters and proposes marriage to her; he offers her the throne back, and confesses his love for her. She angrily rejects him. Eduige tells Grimoaldo that he has become treacherous now that he is king; he answers that he is treacherous for the sake of justice, referring to the fact that she so often refused to marry him and now he, at Garibaldo's instigation, is rejecting her. With Grimoaldo gone, the scheming Garibaldo, who has previously professed to love Eduige, offers to bring her Grimoaldo's head. She declines, but swears that she will be revenged eventually. Alone, Garibaldo details his plan to use Eduige to help him take the throne for himself.
Meanwhile, Bertarido reads the inscription on his own memorial. Along with Unulfo, he watches from hiding as Rodelinda and Flavio lay flowers at the memorial. Garibaldo enters and offers Rodelinda an ultimatum; either she agrees to marry Grimoaldo or Flavio will be killed. Rodelinda agrees, but warns Garibaldo that she will use his head as a step to the throne. Bertarido, still watching, takes Rodelinda's decision as an act of infidelity. Grimoaldo tells Garibaldo not to worry about Rodelinda's threat; under the king's protection, what does he have to fear? Unulfo, meanwhile, tries to comfort Bertarido, but Bertarido is unconvinced.
Garibaldo, as part of his plan to take the throne, tells Eduige that it appears she has lost her chance to become queen, and encourages her to take revenge on Grimoaldo. Eduige then turns her bitterness on Rodelinda, pointing out Rodelinda's sudden decision to betray her husband's memory and marry his usurper. Rodelinda reminds Eduige of who's queen. Eduige again vows vengeance on Grimoaldo, though it is clear she still loves him. Eduige departs and Grimoaldo enters, asking Rodelinda if it is true that she's agreed to marry him. She assures him that it is true, but that she has one condition: Grimoaldo must first kill Flavio in front of her. Grimoaldo, horrified, refuses. Once Rodelinda departs, Garibaldo encourages Grimoaldo to carry out the murder and take Rodelinda as his wife, but Grimoaldo again refuses. He says that Rodelinda's act of courage and determination has made him love her all the more, though he has lost all hope of ever winning her over. Unulfo asks Garibaldo how he could give a king such appalling advice, and Garibaldo expounds his Macchiavellian perspective on the use of power. Bertarido, meanwhile, has approached the palace grounds in disguise, where Eduige recognizes him. She agrees to tell Rodelinda that her husband is still alive. Rodelinda and Bertarido meet in secret, but are discovered by an outraged Grimoaldo. He doesn't recognize Bertarido, but vows to kill him anyway, whether he be Rodelinda's real husband or just her lover. The spouses, before being separated again, bid each other a last farewell.
Unulfo and Eduige make a plan to release Bertarido from prison; they'll smuggle him a weapon and the key to the secret passage that runs under the palace. Grimoaldo, meanwhile, is having a crisis of conscience over the impending execution. Bertarido, in his cell, receives his package. Unulfo, who is allowed access to the prison in an official capacity, comes to release Bertarido. Bertarido, however, can't recognize Unulfo in the darkness, and mistakenly wounds him with the sword. Unulfo shrugs the injury off, and the two leave. Eduige and Rodelinda, meanwhile, have come to visit Bertarido. Finding the cell empty and blood on the floor, they despair of his life. Grimoaldo is still struggling with conscience and flees to the palace garden, hoping to find a peaceful spot where he can finally fall asleep; even shepherds, he laments, can find rest under trees and bushes, but he, a king, can find no rest anywhere. He finally falls asleep, but Garibaldo finds him and decides to take advantage of the situation. He is about to kill Grimoaldo with his own sword when Bertarido enters and kills Garibaldo. Grimoaldo, however, he spares. Grimoaldo gladly gives up all claim to the throne and turns to Eduige, telling her that they shall wed and rule together in his own duchy. Reunited at last, the family rejoices.