Richard Edgar "Rick" Castle (born Richard Alexander Rodgers) is a fictional character on the ABC crime series Castle.
The name Richard Castle is also used as a pseudonym under which a set of real books about the characters Derrick Storm and Nikki Heat, based on the books mentioned in the television series, are written. These books have achieved success, becoming New York Times bestsellers. Actor Nathan Fillion appears as the face of Richard Castle on the books and on the official website, and participates in book signings. The Castle book series was actually written/ghost-written by screenwriter Tom Straw.
Source: Wikipedia