A man staggers into a church on a cold, wintry night. He's in pain. He's bleeding. He's also carrying something in his arms. The man hands the blanketed item over to a priest before collapsing at the altar. Inside the swaddling is a three-month-old baby boy. The delivery man is dead courtesy of multiple gunshot wounds. The victim's name is Cameron. Castle offers to care for the baby he left behind. After all, he has a RHD in childcare. RHD, by the way, stands for "Ruggedly Handsome Dad."
Cameron was shot in his car which, oddly, had no car seat. The victim's wife, Alyssa, says they have no children. She says her dead hubby was a driver for a car service. He'd been acting paranoid lately about being safe. Cameron's boss says he had a heated discussion with someone who rattled him. The intimidating stranger had a tattoo of a howling wolf on his arm. Fittingly, it belongs to a guy known as Jimmy the Wolf. He may have been partners with the murder victim in the botched bank robbery that sent him to prison. The paroled criminal certainly has a motive. But that still doesn't explain the baby.
Castle names the mystery baby "Cosmo." Ryan takes a shot at holding the kid. It doesn't go well. He's worried he's not ready to be a dad. The little guy takes to Lanie though. As for Beckett, she's not interested in holding the baby. She's only interested in finding out where he came from. That's not to say she doesn't know where babies come from. As for Jimmy the Wolf, Ryan and Esposito bring him in. Well, Espo does. Ryan was busy buying a lottery ticket during the arrest. The Wolf admits to knowing Cameron from the botched robbery, but he didn't kill him. He alibis out. The Wolf also has no idea how a baby ties in to all this.
Castle has a hard time handing Baby Cosmo over to child services. Beckett, not so much. She's never been a big baby person. She assures Castle she'll feel differently once they have one of their own. As for the case, Cameron used his night hours to practice escape routes from a place called the Colfax Building. He may have been the wheel man in a heist. But nothing has been reported from the Colfax Building according to the head of security, Walter Dennis.
Esposito and Ryan find the location where Cameron was shot. It's about a five minute drive from the church. There's blood and a diaper at the spot where the gunshots were fired. Baby Cosmo was there. Cameron did everything he could to keep the child safe even after he was shot. Speaking of Cosmo, Castle convinces Beckett to care for the baby for a spell. It turns out to be a lot harder than he thought. Cosmo is crying up a storm and vomiting all over the place. The kid also needs a diaper change. Castle and Beckett make for the perfect team to get him all cleaned up. Baby Cosmo is happy once more. So is Beckett as she holds the cute kid close.
Castle and Beckett are a scary-looking, sleep-deprived pair as they get back to work on the case. CSU determines there was charred celluloid at the crime scene and on the victim. The blood that was found is a match to someone related to the baby. The team digs through dumpsters to track down video footage of a man who bought items that related to the case such as ping pong balls. Unfortunately, his face is hidden. The investigation gets put on hold when Ryan turns on the TV for the lottery drawing. This has Castle remembering that the victim had a lottery ticket on him. It contains all the winning numbers.
There's a TV station located in the Colfax Building. Castle believes the reason nothing was stolen is because the job was to fix the lottery. They replaced the official lottery ping pong balls with doctored ones. All balls but the winning ones were too big to fit in the chute. The lottery announcer, Miranda Vale, has a three-month-old baby. She's relieved to hear her child, Benny, is safe. She was being blackmailed by someone who took her child and her husband, Paul, who is still missing. The race is on to find him before the kidnappers realize their scam is blown.
Castle realizes that Walter Dennis is the inside man at the Colfax Building. He had partners at the limo company where Cameron worked. They are about to kill their loose end when Beckett and her team arrive. Paul is reunited with his wife and baby. He says Cameron was pressured into the crime and tried to save the family. The guy gave his life to rescue baby Benny. Case closed.
Beckett is caught off guard when she learns that Thanksgiving at Castle's place involves donning costumes. Dressing up for turkey day is a tradition! That's why she got all gussied up like Pocahontas. As it turns out, Castle was only kidding. Beckett figured on that possibility. That's why she brought along an extra pilgrim costume for Castle. Hey, what's turkey day without a little dressing!