At Messina, a messenger brings news that Don Pedro, a prince from Aragon, will return that night from a successful battle, Claudio being among his soldiers. Beatrice, Leonato's niece, asks the messenger about Benedick, and makes sarcastic remarks about his ineptitude as a soldier. Leonato explains that "There is a kind of merry war betwixt Signior Benedick and her."
Upon the arrival of the soldiers, Leonato welcomes Don Pedro and invites him to stay for a month, Benedick and Beatrice resume their "merry war," and Pedro's illegitimate brother Don John is introduced. Claudio's feelings for Hero, Leonato's only daughter, are rekindled upon seeing her, and Claudio soon announces to Benedick his intention to court her. Benedick, who openly despises marriage, tries to dissuade his friend but Don Pedro encourages the marriage. Benedick swears that he will never get married. Don Pedro laughs at him and tells him that when he has found the right person he shall get married.
A masquerade ball is planned in celebration of the end of the war, giving a disguised Don Pedro the opportunity to woo Hero on Claudio's behalf. Don John uses this situation to get revenge on his brother Don Pedro by telling young Claudio that Don Pedro is wooing Hero for himself. A furious Claudio confronts Don Pedro, but the misunderstanding is quickly resolved and Claudio wins Hero's hand in marriage.
Meanwhile, Benedick disguises himself and dances with Beatrice. Beatrice proceeds to tell this "mystery man" that Benedick is "the prince's jester, a very dull fool." Benedick, enraged by her words, swears he will have revenge. Don Pedro and his men, bored at the prospect of waiting a week for the wedding, harbour a plan to match-make between Benedick and Beatrice. They arrange for Benedick to overhear a conversation in which they declare that Beatrice is madly in love with him but afraid to tell him; that their pride is the main impediment to their courtship. Meanwhile, Hero and her maid Ursula ensure Beatrice overhears them discuss Benedick's undying love for her. The tricks have the desired effect: both Benedick and Beatrice are delighted to think they are the object of unrequited love, and both accordingly resolve to mend their faults and reconcile.
Meanwhile, Don Pedro's brother Don John, the "bastard prince", plots to prevent the wedding, embarrass his brother, and wreak misery on Leonato and Claudio. He informs Don Pedro and Claudio that Hero is unfaithful, and arranges for them to see John's associate Borachio enter her bedchamber where he has an amorous liaison (actually with Margaret, Hero's chambermaid). Claudio and Don Pedro are taken in, and Claudio vows to humiliate Hero publicly.
At the wedding the next day, Claudio denounces Hero before the stunned guests and storms off with Don Pedro. Hero faints. Her humiliated father Leonato expresses the wish that she would die. The presiding friar intervenes, believing Hero to be innocent. He suggests the family fake Hero's death in order to extract the truth and Claudio's remorse. Prompted by the day's harrowing events, Benedick and Beatrice confess their love for each other. Beatrice then asks Benedick to slay Claudio as proof of his devotion, since he has slandered her kinswoman. Benedick is horrified and at first denies her request. Leonato and his brother Antonio blame Claudio for Hero's apparent death and challenge him to a duel. Benedick then does the same.
Luckily, on the night of Don John's treachery, the local Watch apprehended Borachio and his ally Conrade. Despite the comic ineptness of the Watch (headed by constable Dogberry, a master of malapropisms), they have overheard the duo discussing their evil plans. The Watch arrest the villains and eventually obtain a confession, informing Leonato of Hero's innocence. Though Don John has fled the city, a force is sent to capture him. Claudio, stricken with remorse at Hero's supposed death, agrees to her father's demand that he marry Antonio's daughter, "almost the copy of my child that's dead" and carry on the family name.
At the wedding, the bride is revealed to be Hero, still living. Claudio is overjoyed. Beatrice and Benedick, prompted by their friends' interference, finally and publicly confess their love for each other. As the play draws to a close, a messenger arrives with news of Don John's capture   but Benedick proposes to postpone his punishment to another day so that the couples can enjoy their new-found happiness. Don Pedro is lonely, because he hasn't found love. Thus Benedick gives him the advice "Get thee a wife."
Output: Why does Benedick discourage Claudio from marriage?