The network announced last week it had canceled the show. It earlier confirmed Katic and co-star Tamala Jones wouldn't return for a ninth season if one was to be ordered.
The action-packed finale saw Fillion's novelist-private detective Rick Castle kidnapped by a man who strapped him to a table and administered a truth serum in an effort to extract from Castle all the information he had about the nefarious villain LokSat, an old-school operative Castle knew as his friend Mason, played by Gerald McRaney.
When Mason arrived to question Castle and identified himself as LokSat, the confused author tearfully caved under the power of the medication and admitted his police-captain wife Kate, detective friends, mother and daughter all knew of LokSat's existence, if not his true name. Mason calmly told Castle as he was leaving that he was going to kill everyone Castle loves.
As Mason's minion informed Castle he was about to poison him, Detectives Esposito and Ryan -- played by Jon Huertas and Seamus Dever -- arrived to save the day.
Meanwhile, Mason picked up Kate and brought her to where Castle was under the guise of helping the couple. After Kate acknowledged she knew who Mason really was and he tried to kill her, Castle burst through a door and distracted the bad guy, so Kate could wipe the floor with him.
Kate and Castle embraced and Castle soon reunited with his mother and daughter, played by Susan Sullivan and Molly Quinn.
Just as it seemed Kate and Castle would get their well-deserved happy ending, they were both shot by the previously presumed dead Caleb -- played by Kris Polaha -- in their apartment.
As they are bleeding on the floor, the scene flash-forwarded seven years to show the couple happy and surrounded by young children.
In the final moments of the episode, Castle gazed at his pregnant wife over a busy breakfast table and Castle's voice is heard saying, "Every writer needs inspiration and I found mine."
"Always," Kate said.
"Always," Castle agreed.
Fillion tweeted after the finale aired: "Well. That's it. Thank you, everyone. What an incredible journey. (Mic drop) Castle out."