Castle shows up and surprises Beckett at a crime scene. He's no longer Richard Castle ordinary citizen. He took an online course and got his private investigator's license…without telling Beckett.
Shana Baker, the Admissions Director of Eastbourne Preschool was shot to death in her home by someone lying in wait for her. Even with his P.I.'s license, Gates tells her team they are not allowed to share information with Castle.
Castle tracks down Shana's pet sitter who pepper sprays Castle thinking he's a mugger but Castle learns that Shana took a trip in the days before she died.
Beckett tracks down Nicole Morris, an attorney whom Shana spoke with but she finds Nicole in Castle's new office as he's already tracked her down.
Back home, Castle and Beckett decide to share information just this once and realize that Shaina was looking into the death of her boyfriend, Jeff Whalen 15-years-ago at Radnor University in Boston. Their theorizing leads to the bedroom but later, Castle is upset that Beckett texted Ryan to have him pull up files and now she won't share.
Turns out that Federal Prosecutor Elliott Spaulding was in the room the night Jeff fell out the window at a party but he swears he didn't push him. Unfortunately his father covered it up to protect his son's future. Spaulding says someone pushed Shana to look into this old story to hurt his career. He's a Federal Prosecutor. He'd know better than to leave a cigarette butt with his DNA at the scene of a murder.
Just as Beckett is about to arrest Spaulding, Castle storms in with Sparkles, the victim's dog. Spaulding is highly allergic. There's no way he could have hid in her apartment which was covered in dog fur.
Beckett and the team scour surveillance footage and find that Nicole Morris lifted Spaulding's cigarette butt. Someone hired her to set up Shana and derail Spaulding's career. She's arrested but she won't say who hired her.
Even though he's still not allowed at the 12th precinct, Castle tells Beckett he'd like to continue working at a private investigator. She answers by giving him a gift…a Sherlock hat and a magnifying glass. He's thrilled.