Do not own.
Castle doesn't blame himself for the fact that the guy is a homicidal psychopath. That happened long before Heat Wave, as evidenced by the deranged "books" at the guy's place. He does, however, blame himself for making her his target.
Castle sees her every day: slaying dragons, rescuing distressed damsels, saving the day and looking gorgeous as she does it. Some part of her was fantasy long before Heat had ever been born. Yet, she was so real and... human. She felt anger, passion, compassion, and sympathy in perfect synch, making her the best at what she does.
And that's part of who she is, part of why he loves her. She stops at nothing to serve, protect, or bring closure, even if that meant making sacrifices.
Nikki Heat isn't just based on Kate. She is Kate: all of the characteristics that make Kate Beckett such a good cop and all around good person; all of the characteristics that make him love her.
He hates to see her in actual danger, but he can't take that away from her (even if she would let him, which he knows she won't) because it would change who she is.
It's easier when he writes about her, when he's only pretending to put her in danger in the guise of Nikki Heat. But, of course, it isn't the same.
At the end of the book, Heat will always get her man. She may get a little banged up along the way, but, in the end, she will always head home to her glass of wine, murder mystery, and cast-iron bathtub.
In real-life, that isn't a guarantee. In real-life, when the bomb explodes, it's life or death. In real-life, the bullet doesn't always pass harmlessly by, an inch away from a vital spot.
In real-life, he can lose her.
Of course, that was Storm's fictional ending too. Every story needs a conclusion: who's to say that Nikki's won't be the same?
Nah, Castle figures. Her ending is set. She'll settle down with Rook and retire when she's too old for the force. Maybe she'll even become police chief.
The book's ending will leave her safe, home, and happy, living happily ever after in New York City.
And if his fantasy of Nikki becomes his real-life with Kate, all the better.
Because, in real-life, he can't stand to lose her.
