Homer is going to make an annual speech at the Nuclear Plant. His original plan is to repeat the comedy speech he did every year, but most of his punchlines were already used or they would be offensive, including jokes about Lenny's grandmother who is sick. This makes him so nervous that he passes out on the stage, leading to a trauma of public speaking. Trying to cheer Homer up, Marge takes him to a stand-up comedy show.
At the show, Homer is amazed by the actors' talent to improvise. He, Lenny, and Carl then choose to join an improvisation class, where Homer learns that he has a talent for improvising scenes. They decide to form their own stand-up comedy troupe at Moe's Tavern, where Homer's act is acclaimed by the public and the critics.
In a secondary plot, Bart and Lisa go to Ralph's birthday party, where Bart realizes that Ralph's new treehouse (built with money that Chief Wiggum took from the evidence locker) is much better than his old current treehouse. Feeling envious, he destroys his treehouse. However, when he says that mothers can't build a treehouse, Marge plans to work hard and build him the best treehouse she can.
At the new treehouse, Marge overhears Bart saying to Milhouse that there isn't any need to thank her, as she is only doing her job. Marge gets furious at him, and storms off during dinner when Bart offends her, where Homer learns he is invited to perform at the Springfield Fringe Festival. When Marge complains at him about Bart and learns about the fringe festival, she accidentally makes Homer insecure about his own act.
The next morning, Bart takes Marge's breakfast into her bedroom and apologizes (with Homer's help), and they reconcile. Later at the festival, Moe advises a still insecure Homer that he should cheat on his improvisation act, letting Moe pick his premises. However, Lisa finds out about their plans and convinces Homer to make his show the proper way. He does so, and his on-the-spot act is well-received by the audience.
Homer is then seen taking questions from viewers as different characters (including Bender from Futurama picketing for another revival of his show) pass by him even when the credits roll.
In the international version of the final segment of the episode the characters and sight gags remain, however none of the audio of the live phone call questions or Homer's answers are aired. Instead Homer gives a three minute monologue chronicling his intentions to run for presidency, only to talk himself out of it by the end of his speech.