Emma Mathews, a TV producer is shot and killed in her own apartment by someone who drew a target on her mirror. Emma’s friends say she just got a promotion to produce the 11 o’clock news and that her coworker, Buckley was upset the promotion didn’t go to him. Buckley drives a rusty white van, just like a neighbor saw outside of Emma’s apartment building but he has an alibi.
Stephen King’s assistant calls Castle and says he want to collaborate on a project. Castle goes to the address he’s given for a meeting but once inside the lights go out. He later wakes up to find himself in a classroom with four other men. They’d all been drugged. The doors are all locked and there’s a camera on them.
Beckett gets a text from Castle telling her to get to the same address and that it’s urgent.
Back in the classroom, there’s a card in a drawer that says “Salvation Lies Within” and a Cryptix Lock Box. When one of the men is stung by a bee and goes into anapholactic shock, the epinephrin pen is in the lock box. Castle has to figure out the code. The code is Play or Die. The pen is released and Castle gives it to him but it’s not epinephrin but poison. It was a trick.
Another note says that “Two Will Cure, One Will Kill”. They find more vials with the numbers 1, 2, and 3 on them. The clock in the room has stopped with it’s hands on the 1 and the 3. Castle figures out that he has to combine the vials 1 and 3 and the combined solution saves the man’s life.
There’s message behind the clock that says, “The Key Will Release You”. They find the key to a door in the axe but it only unlocks a small box with a gun. It says “The Last One Standing Will Be Freed”. Then a TV screen shows an identical room with all of their girlfriends or wives inside, including Beckett!
Beckett realizes that some of the other women have the same tattoo as the target that was painted on Emma’s mirror. Their room also has the hidden gun. Meadow takes the gun. The men see it happen on the monitor before it goes dark again. Meadow shoots but Beckett has already taken the bullets out.
On the men’s side, Simon takes the gun saying his wife has the right idea. He fires but the bullet backfires and kills him. The gun was rigged to kill the person shooting it. The monitor goes back on in the ladies side showing Castle holding the gun standing over Simon’s body.
Hayley visits the office and Alexis tries to call Rick but the phone number has been disconnected. Hayley realizes that Stephen King is in Australia and Rick couldn’t have been meeting him. She gets surveillance footage outside the address where Rick was supposed to meet Stephen King and they see him enter. Later they see a body being pulled into a rusty white van. They call Ryan and Esposito.
Ryan and Espo learn that Emma was copying VHS tapes of two children being forced to do strange puzzles. The children are Faye and Brandon Northcliffe, twins. Faye recently hung herself. Their parents, two psychiatrist kept them in isolation and performed experiments on the twins. After her Faye’s suicide, Emma was investigating and hoped to expose what they’d done.
Both the men and the women break out of their respective rooms and meet in the hallway. Castle and Beckett are relieved to find one another. They all see an exit and worry it’s another trap but the minister in the group runs for it anyway. All of the doors close, locking everyone inside once again. A note says that, “OF THOESE WHO REMAIN ONLY YOUR BETTER HALF CAN SURVIVE” and there are three levers. The minister agrees to pull one. Rick agrees to stay behind and pull the other and then Kate pulls the third despite the minister claiming that it’s against the rules.
With the third lever pulled everyone else leaves before the doors close again. The minister turns out to be the twin brother Brandon. He didn’t want Emma to expose his parents with the videos. He wanted his experiment, the murder and his ultimate death to expose them. He chose everyone he trapped as surrogates for the cops, teachers, etc, who let he and his sister down as children. Then he orders Rick and Kate to choose which on of them will die. Instead, they overpower Brandon just as the team from the 12th arrive.
Later, Alexis sulks as she worries over her father. Hayley points out that Castle hasn’t survived just because he’s lucky but because he’s the best at what he does. Then she takes Alexis out to a club. Back at the loft, Rick and Kate share some wine while relaxing at home.