After Martha receives a million dollars through an old boyfriend's will, Castle and the team ponder what they'd do if they ever received a windfall of cash. Beckett is cagey about her answer, which of course makes Castle want to figure that out.
The team is called to investigate the murder of lottery winner Jay Hixton. $100,000 of his cash has been found missing from his home, and one of the exploding dye packs went off. A nearby maintenance worker is covered in blue paint, but he has an alibi. The worker also mentions that he watched Hixton's car being driven away before Hixton was killed.
The car was taken by a drifter named Shawn York. Hixton's estranged wife explains that Reginald tended to give away his cash to whomever he thought needed it. Hixton gave York his car.
Jay's wife opens up to the team, explaining that she and Hixton started talking again because they wanted to help their daughter, Nicole, with her drug addiction. Jay called her to cancel a dinner date on the night of his murder, because he said there was something they both needed to deal with.
Hixton wrote out checks totaling $10,000 to a con man named Logan Meech, who claims that Jay contacted him about getting a gun to protect himself from something from his past. A long time ago, Jay was responsible for placing two criminal brothers in prison. He ID'ed them as being the culprits in a string of robberies in his hometown. They were out and wanted revenge.
The brothers say that Hixton contacted them about dealing with the drug dealer (Marvin Osminkowski) who supplied Nicole. Beckett and Castle have to go undercover at a club to get close to Marvin. Beckett tracks down Marvin and gets him to offer her drugs. This is enough to arrest the dealer, who says that he went to Hixton's apartment but left because Reginald Easley (Hixton's butler) was already there.
The butler did it? Not really. Easley says that Hixton's winning lottery ticket may have been stolen from someone else, Hixton's elderly next door neighbor, who died the day the winning numbers were announced. The numbers held some significance for the neighbor and Hixton was worried that one of the neighbor's relatives may have been after him for the money.
The team speaks with the neighbor's nephew, who says that his uncle had a relationship with a woman who had a son. The son's birthday matched the winning lottery numbers, and the son's name: Shawn York.
Meanwhile, Martha has been feeling guilty about the money, but she wishes to open an acting school in her boyfriend's honor. This gives Castle an idea about what Beckett might do with her money. She'd probably do something to honor her mother. So he starts up a law school scholarship fun in Beckett's mother's name.