Lara Madden is found shot in the head, floating in the water in the Hudson River. Turns out she worked as an entertainer for Iconic Cruise Lines. Perlmutter determines that she was in the water less than ten hours so they look for a cruise boat still near by. He also finds a bag of pure uncut heroin tied to her back molar and dangling down her throat.
Beckett finds the ship still in port and heads out to investigate while Esposito and Ryan track down passengers who have disembarked. She’s shocked to find that Castle is already on board when the ship begins leaving port. The cruise line doesn’t need the bad publicity so they plan to make it out to international waters to avoid this investigation. They send a boat to pick up Castle and Beckett and bring them back to the city.
In the hour before the boat arrives, Castle and Beckett investigate. Castle pretends to be a passenger paying to be part of the dance number to talk to the other entertainers about Lara while Beckett talks to Isaac the bartender.
They find where Lara stashed a camera in a lifejacket. She was doing a documentary about the cruise ship dumping trash and stumbled upon a man named Acosta smuggling uncut heroin for the cartel when she was caught and killed.
Kate chases down Acosta and arrests him. The public defenders office sends Caleb Brown to represent him. Brown wants a deal. He says the bags in the video were spoiled flour and they have no case. Ryan and Espo track down the burner phone that Acosta was using.
Castle asks Hayley to help hack into Beckett’s phone to find out who sent the mysterious text. Hayley figures out it came from Vikram and that they have been sending secret messages. Castle realizes that it all started with Allison Hyde’s death and that it wasn’t suicide but murder by the same people who killed Bracken and the team at the AG’s office.
Vikram sets up a secret office in a closed down strip club. Vikram figures out the the uncut heroin from Lara Madden is a match to Vulcan Simmons drugs which means her killer could lead them to LokSat.
Hayley tries to break through Vikram’s fire wall but Vikram figures out what she’s doing and stops her but now he and Beckett know that Castle and Hayley are on to them.
Beckett wants to talk to Castle but Vikram stops her when he says he’s found the drug delivery guy so he and Beckett find him. He says his contact is from Panama but he leads them to the warehouse where he dropped the heroin but it’s gone. Ryan and Esposito tracked down to Acosta’s partner, Leo Longarzo, a cartel lieutenant.
Castle confronts Beckett about her secrets. She asks why he couldn’t just trust her. He says he feared she was in trouble, instead she was lying to him. She explains she did it to protect him and that she’d die if anything happened to him. Castle says what hurts the most is that they could have done this together. They could have faked the separation and then gone after LokSat together but that it never even occurred to Kate to do it that way because she likes being broken and she needs her obsession and no matter what he does he can’t change that, only she can.
Beckett, Ryan and Esposito go after Longarzo but when he turns to fire on them he is shot and killed. Beckett is devastated, believing her link to LokSat died with him.
Vikram brings her new information. The owner of the warehouse is a shell corporation based in the Cayman Islands but the articles of incorporation from 1999 were written by Caleb Brown. He used to work for a major corporate law firm before giving up his huge salary to be a public defender. It’s the perfect cover. He can contact assets in prison and pass orders to dealers who have been caught. Beckett wants to track Brown’s every move, quietly, hoping that he’ll lead them to LokSat.
Beckett goes to the loft and tells Castle he was right about everything. That their breakup could have just been a cover and they could have worked LokSat together. That’s what she wants to do now. Castle waffles. It’s not that easy, with all he put her through. She hurt him and lost faith in him. Beckett says she didn’t realized how much she needed him until this and asks her not to continue doing this without him. He relents but tells her there will be punishment. Naked punishment.