Selma has a severe hot flash while giving Mr. Burns his driving test. Dr. Hibbert explains (with help from a video starring Robert Wagner) that Selma is experiencing the onset of menopause. Selma chooses that she wants a baby rather than grow old alone. Adoption is suggested, but the Springfield orphanage is empty. Lisa suggests adopting a baby girl from China. One problem is that the Chinese government only allows married couples to adopt. No problem; Selma writes down a name for her husband - Homer's - and "The Simpsons are going to China!" (with Marge acting as Bart and Lisa's nanny) so Selma and Homer can pick up the baby together.
Selma gives Mr. Burns his driving test to replace his old license, which expired in 1909. During the test, she experiences a hot flash and is later taken to the hospital. She learns that she is experiencing menopause (which is explained in a video with Robert Wagner). She is saddened that now she can't have children. Lisa suggests that she adopt a child. However, after her first choice, one of Cletus' children, is taken back, Selma decides to adopt a child from China. Although her forms are in order, Selma learns that she has to be married to legally adopt a child. She puts down the second name she thinks of, after asking the agency if they knew who MacGyver was, and being told yes, she puts down her brother-in-law Homer as her husband. At the moment she lies that she loves him, there is a scene where Homer is eating sandwiches with Lenny and Karl, and he tells them he just felt goosefleshes to the bottom of his soul.
While on the plane to China, Selma informs Homer that he must pretend to be her husband. Shocked, he later decides to do it for Marge. When they arrive, Selma claims that Bart and Lisa are their own children and Marge is their nanny. The Chinese adoption agent, Madam Wu (voiced by Lucy Liu), tells them that they will get a baby in a few days. Reasoning that he has no chance of being outed, Homer claims he is an acrobat when asked and is later called to perform a stunt when the main performer in a show suffers a "bullet-related death" from questioning the Communist Party; Homer is told to perform to forestall a riot brought on by the audience's realization that the CCP is not infallible. Homer himself gets severely hurt performing and is treated in a hospital. There, Selma gets her daughter, whom she names Ling and who is fond of grabbing Homer's eyes. When everyone leaves, Homer and Marge snuggle and are caught by Wu watching through a painting, who takes back Selma's baby, much to Selma's and the baby saddens.
The Simpsons decide to bring back Ling. At the nursery, they dress and spray paint Homer as a golden Buddha statue. The Chinese guards bring him in, although Homer can hardly keep in the pain they are causing trying to move him by inserting a hook into his nostril. He is able to find Ling and get her out. In Tiananmen Square, they are confronted by Madam Wu in a tank and Selma is able to convince her that she should keep Ling, although she needs to sign a form just to talk to her, from bureaucrat to bureaucrat--Wu's leniency stems from how her own mother had raised her as a single parent after her father choked to death on a ping-pong ball the day before the Heimlich maneuver when she was just a baby. In the end, after Madam Wu stops Homer from smuggling a panda cub to the United States, the family (Selma and Ling in tow) depart China via junk--Selma tells Ling that she will return to China someday, "as a spoiled American teenager". Selma then makes her signature laugh, while Ling is shown to have her adoptive mother's laugh.