The episode picks up right after the ending of the last episode, with Castle and Beckett trapped in a freezer after trying to track down a dirty bomb that's threatening to destroy much of the city. The pair nearly share their true feelings for each other but the cold finally overcomes them.
Meanwhile Alexis and Martha return from the spiritual retreat early but are surprised that Castle isn't around. When they're unable to contact him, they contact the precinct. Ryan and Esposito can't contact Beckett either. The pair are eventually found, and Josh is the doctor treating Castle in the ambulance, meaning he never left for Haiti.
Castle and Beckett share their suspicions about a taxi driver named Kevin McCann to federal agent Mark Fallon. McCann was a war hero who was in the special forces in the army. However, McCann died a few years ago and is buried at Arlington National Cemetery. The team must figure out who has taken McCann's identity.
McCann's sister recognizes the man who's stolen her brother's identity as Radford Hayes, who was a part of McCann's unit. They track down Hayes, and Fallon is eager to interrogate him, using any means necessary to get the information they need. When Fallon pulls a gun on Hayes, Beckett pulls her gun on Fallon. The standoff ends with no useful information gained.
Castle works out that Hayes isn't working alone and that the rest of them would want to put the blame on a patsy. They assume that it might be Nazihah Alhabi, Amir's wife. But they find her missing and the FBI agent assigned to protect her dead.
The clock is ticking as the team struggle to track down the bomb. Information leads them to where Hayes' accomplices were keeping Nazihah's baby, which they were holding hostage in order to make her do what they want. The van with the dirty bomb is headed for Times Square. Castle and Beckett find the van before the bomb squad does, but it doesn't look like they'll be able to get get there in time to diffuse the bomb. In a moment of desperation, Castle grabs all the wires on the bomb and rips them off at once. The bomb deactivates.
Back at headquarters, Fallon says farewell to Castle and Beckett, and they all hope that they don't have to work with each other ever again. Castle seems to want to say something to Beckett, but that moment is lost when Josh arrives. Castle leaves the pair alone, keeping his message to his partner a secret.