Lisa wakes up Bart to remind him that her birthday is nearing, and that he forgets it every year. Bart promises to get her a present this year. Meanwhile, Homer discovers that all of his white shirts have turned pink because Bart put his red hat in with the laundry. Homer has no choice but to wear a pink shirt to work and as a result, his co-workers poke fun at him. Mr. Burns suspects him of being a "free-thinking anarchist". Homer is sent home with a 20-question psychiatric quiz that he has to fill in so that Dr. Marvin Monroe can assess his sanity. Homer is too lazy to finish the quiz on his own and lets Bart fill it in. When Dr. Monroe sees the results, he determines that Homer is insane. Homer is sent to a mental institution, and is put in a cell with a large white man who seems to believe he is Michael Jackson (referred to as "the big white guy who thinks he's the little black guy"), and who introduces himself as such. Apparently, somehow never having heard of Michael Jackson, Homer believes him and quickly befriends him.
Marge, upon hearing what has happened, comes to the institution and is able to convince Homer's doctors that he is not insane. Homer bids farewell to Michael, who reveals that he is only in the mental institution voluntarily. Homer decides to let him stay in the family home. He calls and tells Bart that he is bringing Michael to stay for a few days. Against Homer and Michael's wishes, Bart tells his friend Milhouse and soon all of Springfield turns up outside of the Simpson family's home to see Michael. The level of excitement is deflated when Homer introduces Michael and they realize he is an impostor. The townspeople become angry at Bart and leave. At the same time, Lisa comes out of the house and is upset with Bart because he has yet again failed to acknowledge her birthday, because of his excitement over Michael Jackson's arrival.
After overhearing Lisa write in a letter that she is disowning Bart as a brother, the faux Michael convinces Bart to let him help. Together they write and perform a song for Lisa's birthday called "Happy Birthday Lisa". Lisa is thrilled and hugs her brother, saying that he has given her the best present ever. Afterwards, Michael reveals that his real name is Leon Kompowsky, a bricklayer from Paterson, New Jersey. He explains that he had been very angry for most of his life, but found some peace in talking in Jackson's voice because it made everyone around him happy. Leon bids farewell to the Simpsons and walks off down the road, singing Lisa's birthday song to himself in his normal voice. A jazzy version of the song plays over the credits.