An Ideal Husband opens during a dinner party at the home of Sir Robert Chiltern in London's fashionable Grosvenor Square. Sir Robert, a prestigious member of the House of Commons, and his wife, Lady Gertrude Chiltern, are hosting a gathering that includes his friend Lord Goring, a dandified bachelor and close friend to the Chilterns, his sister Mabel Chiltern, and other genteel guests.
During the party, Mrs. Cheveley, an enemy of Lady Chiltern's from their school days, attempts to blackmail Sir Robert into supporting a fraudulent scheme to build a canal in Argentina. Apparently, Mrs. Cheveley's dead mentor, Baron Arnheim, convinced the young Sir Robert many years ago to sell him a Cabinet secret, a secret that suggested he buy stocks in the Suez Canal three days before the British government announced its purchase. Sir Robert made his fortune with that illicit money, and Mrs. Cheveley has the letter to prove his crime. Fearing both the ruin of career and marriage, Sir Robert submits to her demands.
When Mrs. Cheveley pointedly informs Lady Chiltern of Sir Robert's change of heart regarding the canal scheme, the morally inflexible Lady, unaware of both her husband's past and the blackmail plot, insists that Sir Robert renege on his promise. For Lady Chiltern, their marriage is predicated on her having an "ideal husband"—that is, a model spouse in both private and public life that she can worship: thus Sir Robert must remain unimpeachable in all his decisions. Sir Robert complies with the lady's wishes and apparently seals his doom. Also toward the end of Act I, Mabel and Lord Goring come upon a diamond brooch that Lord Goring gave someone many years ago. Goring takes the brooch and asks that Mabel inform him if anyone comes to retrieve it.
In the second act, which also takes place at Sir Robert's house, Lord Goring urges Sir Robert to fight Mrs. Cheveley and admit his guilt to his wife. He also reveals that he and Mrs. Cheveley were formerly engaged. After finishing his conversation with Sir Robert, Goring engages in flirtatious banter with Mabel. He also takes Lady Chiltern aside and obliquely urges her to be less morally inflexible and more forgiving. Once Goring leaves, Mrs. Cheveley appears, unexpected, in search of a brooch she lost the previous evening. Incensed at Sir Robert's reneging on his promise, she ultimately exposes Sir Robert to his wife once they are both in the room. Unable to accept a Sir Robert now unmasked, Lady Chiltern then denounces her husband and refuses to forgive him.
In the third act, set in Lord Goring's home, Goring receives a pink letter from Lady Chiltern asking for his help, a letter that might be read as a compromising love note. Just as Goring receives this note, however, his father, Lord Caversham, drops in and demands to know when his son will marry. A visit from Sir Robert, who seeks further counsel from Goring, follows. Meanwhile, Mrs. Cheveley arrives unexpectedly and, misrecognized by the butler as the woman Goring awaits, is ushered into Lord Goring's drawing room. While she waits, she finds Lady Chiltern's letter. Ultimately, Sir Robert discovers Mrs. Cheveley in the drawing room and, convinced of an affair between these two former loves, angrily storms out of the house.
When she and Lord Goring confront each other, Mrs. Cheveley makes a proposal: claiming to still love Goring from their early days of courtship, she offers to exchange Sir Robert's letter for her old beau's hand in marriage. Lord Goring declines, accusing her of defiling love by reducing courtship to a vulgar transaction and ruining the Chilterns' marriage. He then springs his trap. Removing the diamond brooch from his desk drawer, he binds it to Cheveley's wrist with a hidden device. Goring then reveals how the item came into her possession: apparently Mrs. Cheveley stole it from his cousin years ago. To avoid arrest, Cheveley must trade the incriminating letter for her release from the bejeweled handcuff. After Goring obtains and burns the letter, however, Mrs. Cheveley steals Lady Chiltern's note from his desk. Vengefully she plans to send it to Sir Robert misconstrued as a love letter addressed to the dandified lord. Mrs. Cheveley exits the house in triumph.
The final act, which returns to Grosvenor Square, resolves the many plot complications sketched above with a decidedly happy ending. Lord Goring proposes to and is accepted by Mabel. Lord Caversham informs his son that Sir Robert has denounced the Argentine canal scheme before the House. Lady Chiltern then appears, and Lord Goring informs her that Sir Robert's letter has been destroyed but that Mrs. Cheveley has stolen her letter and plans to use it to destroy her marriage. At that moment, Sir Robert enters while reading Lady Chiltern's letter, but he has mistaken it for a letter of forgiveness written for him. The two reconcile. The ever-upright Lady Chiltern then attempts to drive Sir Robert to renounce his career in politics, but Lord Goring dissuades her from doing so. When Sir Robert refuses Lord Goring his sister's hand in marriage, still believing he has taken up with Mrs. Cheveley, Lady Chiltern is forced to explain last night's events and the true nature of the letter. Sir Robert relents, and Lord Goring and Mabel are permitted to wed.