While dumpster diving for apartment furniture, two guys discover a body rolled inside a rug. Meanwhile, Castle complains about the precinct's terrible coffee. Beckett points out that he is trying to avoid the fact that his book - Storm Fall - is being released. A call comes in about the body and the two of them head to the scene.
The victim is Jeff Horn, a prominent NY City Councilman who was in the middle of a highly contested re-election campaign. Because his wallet, money and jewelry are all missing, the authorities assume it was a robbery gone bad... but wonder why the robbers would bother wrapping the body in a rug.
As Esposito and Ryan search the dumpster and canvas the area, Becket and Castle break the news to the victim's devastated widow, Laurie Horn. Laurie tells them that her husband attended a campaign event the night before and said he was planning to work late at the office and would probably sleep on his couch that night.
Castle and Beckett follow up with Horn's campaign manager - Frank Nesbit - who confirms that Horn was at the fundraiser, but reports that Horn never returned to the office. And to further complicate matters, neither the fundraiser nor the campaign office were located near where Horn's body was found. Beckett asks about any possible enemies of Horn and learns that the deceased was in a highly-charged public feud with hotel developer Calvin Creason.
After investigating Creason, Beckett and Castle learn that the rug Horn was wrapped in was a signature rug from his Midtown hotel. Under interrogation, Creason denies murdering Horn. Creason divulges that he was a major contributor to Horn's campaign opponent, Jason Bollinger. And since Horn was behind in the polls, Creason was waiting for Horn to be voted out of office. In other words, he had no motive.
As Castle and Beckett head off to question Bollinger, they learn why Creason was so confident in his candidate. Early in the campaign Bollinger commissioned "opposition research" on Horn and discovered that his opponent was having an affair. Bollinger obtained photographic proof of the affair but, since he was winning the race, decided not to use it. Beckett demands to see the photos and is referred to Bruce Kirby, the private investigator who was hired to do the research.
Beckett and Castle learn from Bruce Kirby that Horn was seeing a high-priced call-girl from an exclusive Web-based escort service.
At the precinct, the cops discuss the difficulties of tracking down a website. Many are located out of state, which makes obtaining warrants and ownership information difficult. In the midst of the discussion, Castle calls the escort service and requests a date with the girl. As Beckett yells at Castle, a delivery man arrives with the espresso machine that Castle has ordered for the precinct.
Castle meets Tiffany, the call girl, at a local hotel restaurant. Beckett shows up and questions the girl about Horn, discovering that he had recently gotten violent with her, accusing her of exposing their affair. She denied it, but someone was blackmailing Horn with evidence of the relationship. He was desperate to discover who, because he couldn't afford to keep paying.
Castle suggests a scenario... if the Councilman found out the identity of his blackmailer and confronted him, that confrontation could have led to his murder. Maybe the blackmailer killed the Councilman and dumped the body in a way that implicated Creason. Their first stop is the Bollinger campaign, as they try to find out who had access to the photos. Bollinger gives them a list, but has other things on his mind. Laurie Horn has taken over her husband's campaign and is already up in the polls. He wouldn't release the photos, they'd only make Laurie Horn look even better.
Trying to figure out where the payoff money might have come from, Castle and Beckett re-visit Frank Nesbit, Horn's campaign manager. Nesbit hands over the campaign's ledgers to see if any of the payoff money came from campaign funds. The police trace the payments to an account recently opened by Bruce Kirby, the P.I. who took the photos. Kirby is arrested.
Kirby, confronted with the evidence, admits to the blackmail but not the murder. Since the campaign wasn't using the pictures, he thought he'd make a buck. His alibi is terrible -- when Horn was murdered, Kirby was actually waiting to meet with him... to receive a payoff. He'd offered to surrender all the prints and negatives for a huge sum, one he thought Horn could never afford -- $250K. Shockingly, Horn had agreed. Beckett and Castle note that Horn was not that wealthy of a man, and wonder where he planned to get the money. After some research, Castle discovers that Horn's wife, Laurie, came from money.
While examining Laurie's finances, the pair discover she recently unloaded $300,000 worth of stock. Castle and Beckett interrogate Laurie and learn that her late husband had forged her consent on the stock sale document... and that she found out. When Laurie confronted her husband, she discovered his awful "indiscretions" and the blackmail. She knew it was just a matter of time until the information became public. But she says she couldn't have killed him, she was at home with their daughters the night her husband was killed. Then Beckett tells Laurie they discovered the $250,000 at her house when they served a search warrant.
Hearing this, Laurie breaks down. She reveals that having spent her life working with Nesbit to build up her husband for national office, she was not going to let him throw all of that away. And she was certainly not going to be one of those humiliated women who stands by her husband while he performs his Kabuki-theater act of public contrition. She enlisted Nesbit, who knows his political career would be irreparably damaged by these revelations, in her plot to ensure that everything they'd worked for would not simply be thrown away. She made the call for Jeff to meet the "blackmailer" and Nesbit met him there to kill him. At the Horn campaign offices, Esposito and Ryan arrest Nesbit after a brief chase. As Castle, Montgomery and Beckett discuss the case, Castle gets a call from Alexis. He's supposed to be at a bookstore reading from his new book right now!
Castle reads from Storm Fall, many audience members weep openly. He's distracted, however, by Beckett. She cleans up well when she's out of her cop clothes.
After the reading, Beckett makes fun of his overly dramatic reading. Then Martha comes over, telling Castle that the book seems to be doing quite nicely. "Let's just hope Nikki Heat does this well." Nikki Heat? Turns out that's the name of Castle's new character, the one he's basing on Beckett. As Beckett angrily argues with Castle about the name, we end our episode.