As the story opens, Castle and Beckett head to the Baron's All-American Beauty Pageant, where a contestant is found dead. Miss Illinois' body lies lifeless on the stage, and the duo go in search of the murderer, which is likely one of the other women competing in the pageant. Amber Middlebury, Miss Illinois, had been strangled with her contestant sash; later, a fragment of a black sequin is found in her hair. Victor and Kayla Baron, a businessman and his wife, are devastated that one of the pageant contestants has died, but it appears that they are only upset while the cameras are on. Victor informs Beckett that they'll cooperate with the investigation and adds that Candace, the pageant coordinator, should be able to provide Castle and Beckett with any information that they'll need.
Castle and Beckett learn that another pageant contestant had overheard Amber in an argument with a man before she was killed. The contestant doesn't know who the man is, but she suspects that it could have been an old boyfriend of Amber's. Justin Hankel, Amber's pageant consultant, states that he did not know anything about either the argument or the man, but he said that Amber had claimed there was someone who was trying to take advantage of her. It could have been Bobby Stark, the host of the pageant. Bobby's tuxedo was covered with sequins similar to the one found in Amber's hair. Bobby has also had several restraining orders filed against him, though his alibi always checks out. Miss Georgia tells the team that she had found naked pictures of Amber attached to a blackmail note. A photographer who used to work with Amber said that Jeremy, her boyfriend, used to dabble in amateur photography himself, though he is not a suspect, since he was murdered before Amber was.
Back at home, Alexis wants steady boyfriend Ashley to go to Stanford. She knows that long-distance relationships don't always last, but it has always been Ashley's dream to attend Stanford. Intending to spare herself and Ashley the pain of a possible broken relationship, Alexis decides to break up with him immediately, while their relationship is still good. Soon thereafter, Ashley visits Castle at the precinct, telling Castle that he loves Alexis and believes that the two of them can successfully handle being apart. Ashley asks Castle to intercede with Alexis on his behalf, but Castle prefers not to interfere, promising only that he will talk to Alexis, not that he will try to change her mind. Castle keeps his promise to Ashley, making certain to tell Alexis that Ashley had requested Castle's assistance.
Castle tells Alexis to look at the big picture in this situation, because she might miss something important if she concentrates only upon the fact that many long-distance relationships do cause break-ups. He doesn't want her to miss the chance that she and Ashley can handle the distance.
Following his own advice about looking at the big picture, Castle again peruses the blackmail photos of Amber. By studying the setting of those photos, Castle determines that the photos were actually taken at Victor Baron's home in the Hamptons. Upon being questioned again, Victor denies blackmailing Amber and asserts that it was actually the other way around. Amber had been blackmailing him with the pictures that Jeremy had shot at Victor's house. Amber believed that if the photos became public, they would ruin Victor and his business, so she blackmailed Victor by threatening those photos. To save his business, Victor agreed to help Amber win the pageant. Kayla Baron verified that Victor was with Jeremy when the murder had happened.
One other person had known about the blackmail, pageant director Candace. However, her alibi checks out, since she was with Bobby Stark when Amber was murdered. Castle and Beckett finally realize that Justin, Amber's consultant, has been lying to them all along. He was the one who knew about the blackmail; he was the one who murdered Jeremy. When Justin realized that Amber was also a part of this scheme, he had to put an end to her as well.
Back at the precinct, Captain Montgomery has no idea what to get for his wife for their 30th anniversary. Castle tells him to get something that his wife had said she wanted "when she thought you weren't listening." Captain Montgomery says then that the gift he's giving her is the gift of his retirement. Castle is shocked, but Beckett tells him that he announces his retirement all the time and it never sticks. Ashley does decide to go to Stanford, but Alexis is going with him; she's taken enough extra classes to graduate a semester early. After Alexis tells a rather stunned Castle her decision, he drops bonelessly into a chair, wearing a dazed look and softly repeating "What?, What?, What?"