It's late at night, and a pair of strangers start flirting with each other over a fruit stand. Suddenly, a naked man falls from one of the nearby buildings, landing among the fruit. Meanwhile, Ryan's fiancée Jenny stops by the precinct to drop off a bottle of green juice that he left at home. Apparently, he and Jenny's nuptials are coming up, and they're both on a cleanse. She can't stay long, though, and once she's gone, Esposito mentions that he can't wait to meet some of Jenny's sorority sisters at the wedding. That's when Ryan drops the bomb that Lanie's going to be bringing a plus-one. Esposito's not too happy to hear that, considering their breakup was fairly recent, but just then, he gets a call about the dead body in the fruit stand. At the crime scene, Lanie shows Beckett and Castle fingernail marks on the victim's back, indicating he'd had sex before he'd fallen, while Esposito informs them that the victim was last seen with a redheaded lady. Ryan, meanwhile, managed to locate an eighth-floor hotel room from which the victim had fallen, as well as a driver's license with the name Michael Bailey. Fortunately, Beckett also finds in the hotel room a wine glass with a fingerprint on it, using it to track down the mystery redhead: Holly Franklin, founding partner of law firm Keller, Braun, and Franklin. Apparently, she knew the victim as Jake Hendricks, and says that after they'd had a one-night stand, 'Jake' started feeling dizzy and fell out of the window. Instead of calling 911, she panicked, and fled the scene. Later, in the morgue, Lanie informs Castle and Beckett that the victim was poisoned with a lethal dose of Colchicine, a rheumatism drug, and that it had been put into a chocolate protein shake so as to mask the taste. Also, not only had the victim had sex before he'd died, he'd slept with two women within hours of his death. After breaking the news to Holly, Ryan believes she's sincere in her anger, and theorizes that the other woman Bailey had slept with had caught on to his philandering and killed him. So, Beckett has him check phone records to track down that other woman. The next day, Castle asks Martha and Alexis how they would kill a man that was cheating on them, and is genuinely unnerved at the answers they come up with. He later discusses it with Beckett, realizing the old adage about a scorned woman is true, just as Ryan and Esposito show them a room full of women who had been scorned by Michael Bailey.
After interviewing Bailey's lovers, Esposito learns that they didn't even know Bailey was in town, as he'd lied and said he was going to Europe for six weeks. However, Esposito figures it was more than just a cowardly way of breaking up with them, as the victim had also taken a leave of absence from his job for the past month. Just then, Ryan returns from searching Bailey's apartment. He says Bailey wasn't poisoned there, but he did find stacks of cash and a government-grade fake ID with the name 'Jake Hendricks'. Castle and Beckett go talk to Bailey's boss, Seth Harris, who's in the middle of negotiations when they arrive. However, he takes them aside, and tells them a woman was caught trying to break into Bailey's office the day before. According to a witness's description, the woman worked for El Al Airlines, and they eventually learn her name is Colette Roth. Meanwhile, Ryan has learned the name of Lanie's plus-one: Toby Lang, who Esposito learns is a doctor. He insists on bringing a plus-one to show up Lanie, and Ryan relunctantly concedes, saying he'll need a name for the place card. In the meantime, Castle and Beckett talk with Colette, who was also one of Bailey's former lovers. Apparently, she saw him around town, and when he went to explain why he wasn't in Europe, he was kidnapped right in front of her. She says she went to his office hoping to find a clue as to who kidnapped him. Beckett and her colleagues later confirm via ATM footage that Bailey was indeed kidnapped, and that Colette managed to break the nose of one of the kidnappers.
Castle excitedly theorizes that Bailey was covert ops, and that his enemies had sent a secret agent to seduce and poison him. However, Ryan informs them that the car used in the kidnapping belongs to an insurance salesman named Pablo Barnes. When they raid Pablo's place, they find him and the guy with the broken nose, as well as a couple of half-naked women. Back at the precinct, Pablo and his buddy admit to kidnapping Bailey, but that the kidnapping was staged to scare off Colette. That's when they drop the bomb that Bailey wasn't in covert ops; rather, the three of them were pickup artists (Castle, of course, is disappointed). After the kidnapping, they ended up a bar called The Magic Bottle, where Bailey specifically targeted a married woman, Lisa. Bailey left with her, but Pablo and his friend lament that she'll never make it into a ledger he kept of all his conquests. Later, Castle's going through the ledger, when he finds a picture of Jenny, dated a month after she and Detective Ryan started dating.
Meanwhile, Ryan and Esposito talk with a bartender at The Magic Bottle, who checks credit card slips and informs the detectives that the woman's name was Lisa Hill. Turns out, Lisa Hill is not only married but an heiress to a publishing company, and had access to the poison through her sister, who owns a drug company. Castle and Beckett theorize that Bailey had seduced Lisa and then attempted to blackmail her, only Lisa refused to pay. Castle then changes the subject, insisting they tell Ryan about Jenny sleeping with Bailey. Beckett is vehemently against it, pointing out that men want to know how many lovers have come before them but at the same time, don't want to know. Later, Castle returns home, to find Alexis in a fancy new dress. However, she says she won't be able to be Castle's date for Ryan and Jenny's wedding, since she and Martha met a couple of guys while out shopping and both have been invited to a charity concert featuring Lady Gaga. The next day, Ryan's cleanse starts to get to him, and he starts fighting with Esposito for eating a doughnut in front of him. Beckett and Castle break it up, after which Ryan apologizes to Esposito. Beckett then has Lisa Hill brought in for questioning, and learns that after Bailey and Lisa slept together, she caught him snooping on her computer and kicked him out. After checking Bailey's email account, Beckett and her colleagues discover that Bailey had emailed himself some confidential documents pertaining to a multibillion-dollar deal Lisa's husband Ron was involved in, involving a mining company called KPW. Castle recognizes Ron from negotiations with Bailey's boss.
Later, Ryan and Esposito discover that Ron and Lisa both have alibis. Not only that, but Holly Franklin also works for KPW, meaning Bailey slept with her and Lisa solely to steal corporate secrets. While Ryan and Esposito keep digging into the deal Holly and Ron Hill are working on, Beckett and Castle realize that Bailey's boss is the one who put him up to the corporate espionage, as well as providing Bailey with the stacks of cash and fake ID. They question Harris, but he refuses to cooperate with their investigation unless they charge him with something. So, while munching on Chinese food, they and their colleagues run down the list of female executives involved in the deal. Ryan practically drools over the food, so they convince him to break his cleanse. As he's chowing down, Esposito prepares to tell him about Jenny sleeping with Bailey. Ryan, however, already knows, and says he's okay with it since he and Jenny weren't exclusive at the time. Ryan then reveals that he did some digging and managed to locate a second apartment Bailey's company kept for him. There, they find a pack of chocolate protein shakes in the fridge, and realize it's where Bailey was poisoned.
Back at the precinct, Ryan and Esposito inform their colleagues that during the poison time frame, Bailey had asked not to be disturbed as he'd had a visitor, one who had been there frequently. What's more, a security camera managed to capture an image of the visitor, someone Castle and Beckett instantly recognize. They later crash another round of negotiations, this time to arrest KPW C.O.O. Amy Kemp (a.k.a. the lady who caught Colette trying to break into Bailey's office). Turns out, she'd poisoned Bailey when she found out he'd been using her, rationalizing it as protecting corporate secrets. Ryan expresses relief to be out of the dating game, to which Castle replies that the games are just beginning for him. The next day, Lanie arrives at Ryan's wedding with Toby, to find Esposito there with a beautiful woman named Jody. As Jody and Toby each excuse themselves, Lanie reveals that Toby is actually gay, and that she brought him to keep her company while Esposito flirted with Jenny's sorority sisters. That's when Esposito divulges that Jody is actually his cousin, and that he brought her to make Lanie jealous. Deciding to be civil, Esposito escorts Lanie to her seat. Just then, Castle arrives, sans date. Beckett's already there, and once he explains the situation with Alexis, she offers to be his date. As the wedding gets started, Castle says he kind of envies Ryan, and Beckett replies that maybe third time will be the charm for him.