ABC announced that Castle had been picked up for a fourth season in January 2011. The initial order was for 22 episodes and then increased to 24 episodes.
Season 4 premiered on September 19, 2011.
Even though Castle and Beckett are both single, both harbor secrets from each other that could destroy their partnership: Beckett that she heard Castle tell her he loved her after she was shot, and Castle that he made a deal that would keep her safe from the conspirators behind her mother's murder as long as she stays away from the case. Through it all, their mutual attraction doesn't dim. Meanwhile, Martha's acting school gets off the ground, Alexis prepares to graduate high school, Ryan plans a wedding, and Lanie and Esposito try to rebuild their friendship after breaking up.
- Beckett and Castle reunite after Beckett cuts off contact with Castle after being shot.
- The serial killer 3XK resurfaces when the gun he stole from Ryan is used in a murder.
- Alexis is crushed when she is denied early admission to Stanford University, where she wanted to attend with her boyfriend, Ashley. They later break up.
- Esposito and Lanie break up.
- Beckett and her colleagues save Castle and Martha from being held hostage in a bank.
- Castle, Ryan, and Esposito dress up as Elvis impersonators to sneak into an Atlantic City casino.
- A sniper goes on the lose, shooting innocent people at random, and setting off Post-Traumatic Stress Disorder in Beckett.
- Ryan gets married to Jenny.
- The Mayor of New York City, Castle's friend from whom he has permission to shadow Beckett, is implicated in a murder, which Castle and Beckett trace back to the man behind the conspiracy that killed her mother.
- Castle imagines the team as real people he discovers in the diary of a 1940s private investigator when the diary has a connection to their latest case and to a mysterious jewel called The Blue Butterfly.
- Castle and Beckett are pulled into a CIA investigation with Castle's former muse, Sophia Turner, of a possible rogue agent who Sophia believes is plotting a worldwide catastrophic event. Castle is crushed when Sophia reveals herself to be the rogue agent.
- Alexis begins interning with Lanie.
- Castle discovers Beckett's secret while they investigate a bombing at a protest march that killed many people.
- With Beckett preparing for a trial, Castle shadows a tough-as-nails detective who he discovers is a dirty cop.
- Castle and Beckett investigate what could be a murder performed by a zombie.
- Alexis graduates from high school.
- Beckett discovers the identity of the sniper who shot her, who also threatens the one man who can protect her. She nearly dies in an to arrest him and quits her job after Gates suspends her for going against orders and keeping information from her.
- Castle reveals that he knows Beckett's secret and he tells her about the deal he made to protect her.
- Beckett gives in to her feelings for Castle and they spend the night together.
Weird Crime Scenes
- A victim is found cut in two in an alley by a long sword.
- Castle and Beckett investigate a murder without a body.
- The director of an art museum is found impaled on one of his museum's sculptures.
- A young man in a haunted house seems to have died from fright.
- Castle and Beckett find themselves kidnapped and handcuffed together in a basement.
- A famous dog trainer is murdered and the only witness is the victim's labrador retriever.
- A killer dresses up his victims like a women from famous fairy tales.