In the pilot episode of "Castle", Castle is consulted by Detective Beckett of the NYPD when two victims are murdered in the style of two deaths portrayed in his novels, "Hell Hath No Fury" and "Flowers for Your Grave" respectively. Though Beckett wants Castle's access to the case limited, Castle repeatedly defies her instructions in order to see the handiwork of his copycat. Unsatisfied with what he considers a boring resolution to the case, Castle convinces Beckett to continue the investigation, and winds up discovering deeper layers to the crime. While the murders initially appeared to have been committed by the mentally ill client of a social worker who was one of the victims, Castle notes that the murderer did not duplicate the crimes exactly, eliminating the possibility that he was a deranged fan. He realizes that the killer was actually the social worker's brother attempting to frame her client, so that he could inherit his father's money after his death (his father suffering from terminal cancer). By the end of the pilot, Castle enters into a working relationship with Beckett under the pretense of conducting research for his new series of "Nikki Heat" novels.